Update the bitcode reader to support reading .bc files where the embedded

metadata references non-Constant values such as instructions.

llvm-svn: 72685
This commit is contained in:
Nick Lewycky
2009-06-01 04:42:10 +00:00
parent 8e4eb22f45
commit 1ca5bb9869
+1 -1
View File
@@ -1025,7 +1025,7 @@ bool BitcodeReader::ParseConstants() {
for (unsigned i = 0; i != Size; i += 2) {
const Type *Ty = getTypeByID(Record[i], false);
if (Ty != Type::VoidTy)
Elts.push_back(ValueList.getConstantFwdRef(Record[i+1], Ty));
Elts.push_back(ValueList.getValueFwdRef(Record[i+1], Ty));
else
Elts.push_back(NULL);
}