projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddde335
)
Make Value::getNameLen not crash on an empty name, fixing PR1712.
author
Chris Lattner
<sabre@nondot.org>
Fri, 28 Sep 2007 20:09:40 +0000
(20:09 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 28 Sep 2007 20:09:40 +0000
(20:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42444
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Value.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Value.cpp
b/lib/VMCore/Value.cpp
index 4bacc2949d4a4215a10f707ebeb0544b64573abc..0150c7e6e96a00f0c56562d70dc04d54e48e8378 100644
(file)
--- a/
lib/VMCore/Value.cpp
+++ b/
lib/VMCore/Value.cpp
@@
-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
;
}