summaryrefslogtreecommitdiffstats
path: root/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
commitf012705c7e4ca8cf90b6b734ce1d5355daca5ba5 (patch)
treed1bcdd1cfc5ddc28894a9b9d6cbb2875d922e437 /lib/Bitcode/Reader/BitcodeReader.cpp
parent804272c8d6fd960c47c8cbc1603aba3fe5a65ea8 (diff)
downloadexternal_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.zip
external_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.gz
external_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.bz2
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 7dffafa..98243e0 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/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++);
}