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:
8fba578
)
NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNo...
author
Devang Patel
<dpatel@apple.com>
Sat, 9 Jan 2010 01:02:22 +0000
(
01:02
+0000)
committer
Devang Patel
<dpatel@apple.com>
Sat, 9 Jan 2010 01:02:22 +0000
(
01:02
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93037
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
patch
|
blob
|
history
diff --git
a/lib/Bitcode/Reader/BitcodeReader.cpp
b/lib/Bitcode/Reader/BitcodeReader.cpp
index 33da5e4d611a09742f8f6cec481ce8e2fc1fc655..bec9c50e301bbaebe0ee60d7d3609ad7631bde01 100644
(file)
--- a/
lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/
lib/Bitcode/Reader/BitcodeReader.cpp
@@
-793,8
+793,10
@@
bool BitcodeReader::ParseMetadata() {
Elts.push_back(NULL);
else {
Value *MD = MDValueList.getValueFwdRef(Record[i]);
- if (MDNode *B = dyn_cast
_or_null
<MDNode>(MD))
+ if (MDNode *B = dyn_cast<MDNode>(MD))
Elts.push_back(B);
+ else
+ return Error("Malformed metadata record");
}
}
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),