[cfe-commits] r83303 - in /cfe/trunk/lib/CodeGen: CGCall.cpp CGExprScalar.cpp CodeGenModule.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Oct 5 06:47:21 PDT 2009
Author: d0k
Date: Mon Oct 5 08:47:21 2009
New Revision: 83303
URL: http://llvm.org/viewvc/llvm-project?rev=83303&view=rev
Log:
Use new predicates for some type equality tests.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=83303&r1=83302&r2=83303&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Oct 5 08:47:21 2009
@@ -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()) {
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=83303&r1=83302&r2=83303&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Mon Oct 5 08:47:21 2009
@@ -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)));
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=83303&r1=83302&r2=83303&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Oct 5 08:47:21 2009
@@ -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());
More information about the cfe-commits
mailing list