mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
Use new predicates for some type equality tests.
llvm-svn: 83303
This commit is contained in:
@@ -892,8 +892,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
|
||||
}
|
||||
|
||||
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()) {
|
||||
|
||||
@@ -818,11 +818,11 @@ Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
|
||||
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)));
|
||||
|
||||
@@ -1088,7 +1088,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user