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:
82e791d
)
add a missing check
author
Chris Lattner
<sabre@nondot.org>
Sun, 6 May 2007 07:33:01 +0000
(07:33 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 6 May 2007 07:33:01 +0000
(07:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36859
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 283cd1df7751fe03f929c4ac88dbc11282de1d7e..2e9de1c1f132aff585e488e29c675dc8827d7481 100644
(file)
--- a/
lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/
lib/Bitcode/Reader/BitcodeReader.cpp
@@
-691,6
+691,7
@@
bool BitcodeReader::ParseConstants() {
V = UndefValue::get(CurTy); // Unknown cast.
} else {
const Type *OpTy = getTypeByID(Record[1]);
+ if (!OpTy) return Error("Invalid CE_CAST record");
Constant *Op = ValueList.getConstantFwdRef(Record[2], OpTy);
V = ConstantExpr::getCast(Opc, Op, CurTy);
}