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:
dac8bde
)
If string field is empty then return NULL.
author
Devang Patel
<dpatel@apple.com>
Fri, 30 Oct 2009 22:52:47 +0000
(22:52 +0000)
committer
Devang Patel
<dpatel@apple.com>
Fri, 30 Oct 2009 22:52:47 +0000
(22:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85630
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/DebugInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/DebugInfo.cpp
b/lib/Analysis/DebugInfo.cpp
index 1d340b907a98e987d1ac8181330ff559de8b330b..7bff11ec5b459a94dec8bb96b31ad5285f3277af 100644
(file)
--- a/
lib/Analysis/DebugInfo.cpp
+++ b/
lib/Analysis/DebugInfo.cpp
@@
-84,8
+84,11
@@
DIDescriptor::getStringField(unsigned Elt) const {
return NULL;
if (Elt < DbgNode->getNumElements())
- if (MDString *MDS = dyn_cast_or_null<MDString>(DbgNode->getElement(Elt)))
+ if (MDString *MDS = dyn_cast_or_null<MDString>(DbgNode->getElement(Elt))) {
+ if (MDS->getLength() == 0)
+ return NULL;
return MDS->getString().data();
+ }
return NULL;
}