Use new predicates for some type equality tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 2a1843e..bad166f 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -892,8 +892,7 @@
}
llvm::Instruction *CI = CS.getInstruction();
- if (Builder.isNamePreserving() &&
- CI->getType() != llvm::Type::getVoidTy(VMContext))
+ if (Builder.isNamePreserving() && !CI->getType()->isVoidTy())
CI->setName("call");
switch (RetAI.getKind()) {
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 21b4558..d0c2453 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -818,11 +818,11 @@
NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
} else {
// Add the inc/dec to the real part.
- if (InVal->getType() == llvm::Type::getFloatTy(VMContext))
+ if (InVal->getType()->isFloatTy())
NextVal =
llvm::ConstantFP::get(VMContext,
llvm::APFloat(static_cast<float>(AmountVal)));
- else if (InVal->getType() == llvm::Type::getDoubleTy(VMContext))
+ else if (InVal->getType()->isDoubleTy())
NextVal =
llvm::ConstantFP::get(VMContext,
llvm::APFloat(static_cast<double>(AmountVal)));
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index f93c604..fdc9740 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1088,7 +1088,7 @@
llvm::CallInst *NewCall = llvm::CallInst::Create(NewFn, ArgList.begin(),
ArgList.end(), "", CI);
ArgList.clear();
- if (NewCall->getType() != llvm::Type::getVoidTy(Old->getContext()))
+ if (!NewCall->getType()->isVoidTy())
NewCall->takeName(CI);
NewCall->setAttributes(CI->getAttributes());
NewCall->setCallingConv(CI->getCallingConv());