summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
commitccce8bae14a8539e7c9e8d694e2126dd30dc774f (patch)
tree56fd200381c4089dabdb97ce70eb595db1ae7bd4 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf22afe32f905c0b229d6e55e913e8584249747f3 (diff)
downloadbcm5719-llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.tar.gz
bcm5719-llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.zip
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
llvm-svn: 92726
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 7dffafa8314..98243e0e249 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -808,7 +808,7 @@ bool BitcodeReader::ParseMetadata() {
const Type *Ty = getTypeByID(Record[i], false);
if (Ty->isMetadataTy())
Elts.push_back(MDValueList.getValueFwdRef(Record[i+1]));
- else if (Ty != Type::getVoidTy(Context))
+ else if (!Ty->isVoidTy())
Elts.push_back(ValueList.getValueFwdRef(Record[i+1], Ty));
else
Elts.push_back(NULL);
@@ -2238,7 +2238,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
}
// Non-void values get registered in the value table for future use.
- if (I && I->getType() != Type::getVoidTy(Context))
+ if (I && !I->getType()->isVoidTy())
ValueList.AssignValue(I, NextValueNo++);
}
OpenPOWER on IntegriCloud