forked from OSchip/llvm-project
Rely on default zero-arg value for IRBuilder::CreateCall calls to zero-arg functions
Patch by servuswiegehtz at yahoo.de llvm-svn: 242168
This commit is contained in:
parent
984a3613b3
commit
4ba525b727
|
@ -535,7 +535,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
}
|
||||
case Builtin::BI__builtin_readcyclecounter: {
|
||||
Value *F = CGM.getIntrinsic(Intrinsic::readcyclecounter);
|
||||
return RValue::get(Builder.CreateCall(F, {}));
|
||||
return RValue::get(Builder.CreateCall(F));
|
||||
}
|
||||
case Builtin::BI__builtin___clear_cache: {
|
||||
Value *Begin = EmitScalarExpr(E->getArg(0));
|
||||
|
@ -923,7 +923,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
}
|
||||
case Builtin::BI__builtin_unwind_init: {
|
||||
Value *F = CGM.getIntrinsic(Intrinsic::eh_unwind_init);
|
||||
return RValue::get(Builder.CreateCall(F, {}));
|
||||
return RValue::get(Builder.CreateCall(F));
|
||||
}
|
||||
case Builtin::BI__builtin_extend_pointer: {
|
||||
// Extends a pointer to the size of an _Unwind_Word, which is
|
||||
|
@ -962,7 +962,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
|
||||
// Store the stack pointer to the setjmp buffer.
|
||||
Value *StackAddr =
|
||||
Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave), {});
|
||||
Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave));
|
||||
Value *StackSaveSlot =
|
||||
Builder.CreateGEP(Buf, ConstantInt::get(Int32Ty, 2));
|
||||
Builder.CreateStore(StackAddr, StackSaveSlot);
|
||||
|
@ -3399,7 +3399,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
|
|||
: InlineAsm::get(FTy, ".inst 0x" + utohexstr(ZExtValue), "",
|
||||
/*SideEffects=*/true);
|
||||
|
||||
return Builder.CreateCall(Emit, {});
|
||||
return Builder.CreateCall(Emit);
|
||||
}
|
||||
|
||||
if (BuiltinID == ARM::BI__builtin_arm_dbg) {
|
||||
|
@ -3543,7 +3543,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
|
|||
|
||||
if (BuiltinID == ARM::BI__builtin_arm_clrex) {
|
||||
Function *F = CGM.getIntrinsic(Intrinsic::arm_clrex);
|
||||
return Builder.CreateCall(F, {});
|
||||
return Builder.CreateCall(F);
|
||||
}
|
||||
|
||||
// CRC32
|
||||
|
@ -4339,7 +4339,7 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
|
|||
|
||||
if (BuiltinID == AArch64::BI__builtin_arm_clrex) {
|
||||
Function *F = CGM.getIntrinsic(Intrinsic::aarch64_clrex);
|
||||
return Builder.CreateCall(F, {});
|
||||
return Builder.CreateCall(F);
|
||||
}
|
||||
|
||||
// CRC32
|
||||
|
@ -6375,7 +6375,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
|
|||
break;
|
||||
}
|
||||
|
||||
Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID), {});
|
||||
Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID));
|
||||
Builder.CreateStore(Builder.CreateExtractValue(Call, 0), Ops[0]);
|
||||
return Builder.CreateExtractValue(Call, 1);
|
||||
}
|
||||
|
|
|
@ -988,7 +988,7 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
|
|||
llvm::Value *Stack = CreateTempAlloca(Int8PtrTy, "saved_stack");
|
||||
|
||||
llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave);
|
||||
llvm::Value *V = Builder.CreateCall(F, {});
|
||||
llvm::Value *V = Builder.CreateCall(F);
|
||||
|
||||
Builder.CreateStore(V, Stack);
|
||||
|
||||
|
|
|
@ -1311,7 +1311,7 @@ struct PerformSEHFinally : EHScopeStack::Cleanup {
|
|||
// Compute the two argument values.
|
||||
QualType ArgTys[2] = {Context.UnsignedCharTy, Context.VoidPtrTy};
|
||||
llvm::Value *LocalAddrFn = CGM.getIntrinsic(llvm::Intrinsic::localaddress);
|
||||
llvm::Value *FP = CGF.Builder.CreateCall(LocalAddrFn, {});
|
||||
llvm::Value *FP = CGF.Builder.CreateCall(LocalAddrFn);
|
||||
llvm::Value *IsForEH =
|
||||
llvm::ConstantInt::get(CGF.ConvertType(ArgTys[0]), F.isForEHCleanup());
|
||||
Args.add(RValue::get(IsForEH), ArgTys[0]);
|
||||
|
|
|
@ -2416,8 +2416,7 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked) {
|
|||
}
|
||||
|
||||
llvm::CallInst *CodeGenFunction::EmitTrapCall(llvm::Intrinsic::ID IntrID) {
|
||||
llvm::CallInst *TrapCall =
|
||||
Builder.CreateCall(CGM.getIntrinsic(IntrID), {});
|
||||
llvm::CallInst *TrapCall = Builder.CreateCall(CGM.getIntrinsic(IntrID));
|
||||
|
||||
if (!CGM.getCodeGenOpts().TrapFuncName.empty())
|
||||
TrapCall->addAttribute(llvm::AttributeSet::FunctionIndex,
|
||||
|
|
|
@ -2009,7 +2009,7 @@ CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(llvm::Value *value) {
|
|||
|
||||
// Call the marker asm if we made one, which we do only at -O0.
|
||||
if (marker)
|
||||
Builder.CreateCall(marker, {});
|
||||
Builder.CreateCall(marker);
|
||||
|
||||
return emitARCValueOperation(*this, value,
|
||||
CGM.getARCEntrypoints().objc_retainAutoreleasedReturnValue,
|
||||
|
|
|
@ -160,7 +160,7 @@ namespace {
|
|||
|
||||
void Emit(CodeGenFunction &CGF, Flags flags) override {
|
||||
if (!MightThrow) {
|
||||
CGF.Builder.CreateCall(Fn, {})->setDoesNotThrow();
|
||||
CGF.Builder.CreateCall(Fn)->setDoesNotThrow();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2095,7 +2095,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
|
|||
CGBuilderTy Builder(Entry);
|
||||
if (InitIsInitFunc) {
|
||||
if (Init)
|
||||
Builder.CreateCall(Init, {});
|
||||
Builder.CreateCall(Init);
|
||||
} else {
|
||||
// Don't know whether we have an init function. Call it if it exists.
|
||||
llvm::Value *Have = Builder.CreateIsNotNull(Init);
|
||||
|
@ -2104,7 +2104,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
|
|||
Builder.CreateCondBr(Have, InitBB, ExitBB);
|
||||
|
||||
Builder.SetInsertPoint(InitBB);
|
||||
Builder.CreateCall(Init, {});
|
||||
Builder.CreateCall(Init);
|
||||
Builder.CreateBr(ExitBB);
|
||||
|
||||
Builder.SetInsertPoint(ExitBB);
|
||||
|
@ -2133,7 +2133,7 @@ LValue ItaniumCXXABI::EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF,
|
|||
llvm::Value *Val = CGF.CGM.GetAddrOfGlobalVar(VD, Ty);
|
||||
llvm::Function *Wrapper = getOrCreateThreadLocalWrapper(VD, Val);
|
||||
|
||||
Val = CGF.Builder.CreateCall(Wrapper, {});
|
||||
Val = CGF.Builder.CreateCall(Wrapper);
|
||||
|
||||
LValue LV;
|
||||
if (VD->getType()->isReferenceType())
|
||||
|
@ -3620,7 +3620,7 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) {
|
|||
catchCall->setCallingConv(CGM.getRuntimeCC());
|
||||
|
||||
// Call std::terminate().
|
||||
llvm::CallInst *termCall = builder.CreateCall(CGM.getTerminateFn(), {});
|
||||
llvm::CallInst *termCall = builder.CreateCall(CGM.getTerminateFn());
|
||||
termCall->setDoesNotThrow();
|
||||
termCall->setDoesNotReturn();
|
||||
termCall->setCallingConv(CGM.getRuntimeCC());
|
||||
|
|
Loading…
Reference in New Issue