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:
bc9506f
)
Check for null MDNode element while printing comment.
author
Devang Patel
<dpatel@apple.com>
Wed, 30 Sep 2009 21:26:51 +0000
(21:26 +0000)
committer
Devang Patel
<dpatel@apple.com>
Wed, 30 Sep 2009 21:26:51 +0000
(21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83172
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index fbd62dd0728e311f767d1f54e22ed0e8dbeb2be3..34ce7bb9964137b490752217e83d2b78a0a5e67e 100644
(file)
--- a/
lib/VMCore/AsmWriter.cpp
+++ b/
lib/VMCore/AsmWriter.cpp
@@
-874,7
+874,7
@@
static void WriteMDNodeComment(const MDNode *Node,
formatted_raw_ostream &Out) {
if (Node->getNumElements() < 1)
return;
- ConstantInt *CI = dyn_cast<ConstantInt>(Node->getElement(0));
+ ConstantInt *CI = dyn_cast
_or_null
<ConstantInt>(Node->getElement(0));
if (!CI) return;
unsigned Val = CI->getZExtValue();
unsigned Tag = Val & ~LLVMDebugVersionMask;