mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Make Value::getNameLen not crash on an empty name, fixing PR1712.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ddde335cb7
commit
d7c4ca1009
@ -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