mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 14:07:32 +00:00
Make Value::getNameLen not crash on an empty name, fixing PR1712.
llvm-svn: 42444
This commit is contained in:
parent
2fca1e4f84
commit
14442c9a4d
@ -128,7 +128,7 @@ const char *Value::getNameStart() const {
|
||||
/// getNameLen - Return the length of the string, correctly handling nul
|
||||
/// characters embedded into them.
|
||||
unsigned Value::getNameLen() const {
|
||||
return Name->getKeyLength();
|
||||
return Name ? Name->getKeyLength() : 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user