diff options
| author | John McCall <rjmccall@apple.com> | 2016-10-26 23:46:34 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2016-10-26 23:46:34 +0000 |
| commit | b92ab1afd5aa1418402918ef70380ccb9470af7b (patch) | |
| tree | 5d650c681c9a1aa0865add5522af59e98e39d023 /clang/lib/CodeGen/CGExprComplex.cpp | |
| parent | 48ef6ca0c381cf7b90592ceba9239757b54723cb (diff) | |
| download | bcm5719-llvm-b92ab1afd5aa1418402918ef70380ccb9470af7b.tar.gz bcm5719-llvm-b92ab1afd5aa1418402918ef70380ccb9470af7b.zip | |
Refactor call emission to package the function pointer together with
abstract information about the callee. NFC.
The goal here is to make it easier to recognize indirect calls and
trigger additional logic in certain cases. That logic will come in
a later patch; in the meantime, I felt that this was a significant
improvement to the code.
llvm-svn: 285258
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index af7f190f793..60bbc5cfac1 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -598,10 +598,10 @@ ComplexPairTy ComplexExprEmitter::EmitComplexBinOpLibCall(StringRef LibCallName, llvm::FunctionType *FTy = CGF.CGM.getTypes().GetFunctionType(FuncInfo); llvm::Constant *Func = CGF.CGM.CreateBuiltinFunction(FTy, LibCallName); - llvm::Instruction *Call; + CGCallee Callee = CGCallee::forDirect(Func, FQTy->getAs<FunctionProtoType>()); - RValue Res = CGF.EmitCall(FuncInfo, Func, ReturnValueSlot(), Args, - FQTy->getAs<FunctionProtoType>(), &Call); + llvm::Instruction *Call; + RValue Res = CGF.EmitCall(FuncInfo, Callee, ReturnValueSlot(), Args, &Call); cast<llvm::CallInst>(Call)->setCallingConv(CGF.CGM.getBuiltinCC()); return Res.getComplexVal(); } |

