diff options
author | James Y Knight <jyknight@google.com> | 2019-02-05 16:42:33 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-05 16:42:33 +0000 |
commit | 9871db064d3ee0d364d4d50a9f95e5d51804e19b (patch) | |
tree | 270494669a946ea44e1ae0cbc2dfc47e19b3e056 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | d9c9dc036ca5ea98de431e6a2c1a3c90e139e9b5 (diff) | |
download | llvm-9871db064d3ee0d364d4d50a9f95e5d51804e19b.zip llvm-9871db064d3ee0d364d4d50a9f95e5d51804e19b.tar.gz llvm-9871db064d3ee0d364d4d50a9f95e5d51804e19b.tar.bz2 |
[opaque pointer types] Pass function types for runtime function calls.
Emit{Nounwind,}RuntimeCall{,OrInvoke} have been modified to take a
FunctionCallee as an argument, and CreateRuntimeFunction has been
modified to return a FunctionCallee. All callers have been updated.
Additionally, CreateBuiltinFunction is removed, as it was redundant
with CreateRuntimeFunction after some previous changes.
Differential Revision: https://reviews.llvm.org/D57668
llvm-svn: 353184
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 04195e4..c1d31b1 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -566,7 +566,7 @@ public: JumpDest RethrowDest; /// A function to call to enter the catch. - llvm::Constant *BeginCatchFn; + llvm::FunctionCallee BeginCatchFn; /// An i1 variable indicating whether or not the @finally is /// running for an exception. @@ -578,8 +578,8 @@ public: public: void enter(CodeGenFunction &CGF, const Stmt *Finally, - llvm::Constant *beginCatchFn, llvm::Constant *endCatchFn, - llvm::Constant *rethrowFn); + llvm::FunctionCallee beginCatchFn, + llvm::FunctionCallee endCatchFn, llvm::FunctionCallee rethrowFn); void exit(CodeGenFunction &CGF); }; @@ -3087,7 +3087,7 @@ public: bool EmitOMPLinearClauseInit(const OMPLoopDirective &D); typedef const llvm::function_ref<void(CodeGenFunction & /*CGF*/, - llvm::Value * /*OutlinedFn*/, + llvm::Function * /*OutlinedFn*/, const OMPTaskDataTy & /*Data*/)> TaskGenTy; void EmitOMPTaskBasedDirective(const OMPExecutableDirective &S, @@ -3598,30 +3598,30 @@ public: void checkTargetFeatures(const CallExpr *E, const FunctionDecl *TargetDecl); - llvm::CallInst *EmitRuntimeCall(llvm::Value *callee, + llvm::CallInst *EmitRuntimeCall(llvm::FunctionCallee callee, const Twine &name = ""); - llvm::CallInst *EmitRuntimeCall(llvm::Value *callee, - ArrayRef<llvm::Value*> args, + llvm::CallInst *EmitRuntimeCall(llvm::FunctionCallee callee, + ArrayRef<llvm::Value *> args, const Twine &name = ""); - llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee, + llvm::CallInst *EmitNounwindRuntimeCall(llvm::FunctionCallee callee, const Twine &name = ""); - llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee, - ArrayRef<llvm::Value*> args, + llvm::CallInst *EmitNounwindRuntimeCall(llvm::FunctionCallee callee, + ArrayRef<llvm::Value *> args, const Twine &name = ""); SmallVector<llvm::OperandBundleDef, 1> getBundlesForFunclet(llvm::Value *Callee); - llvm::CallBase *EmitCallOrInvoke(llvm::Value *Callee, + llvm::CallBase *EmitCallOrInvoke(llvm::FunctionCallee Callee, ArrayRef<llvm::Value *> Args, const Twine &Name = ""); - llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::Value *callee, + llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, ArrayRef<llvm::Value *> args, const Twine &name = ""); - llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::Value *callee, + llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, const Twine &name = ""); - void EmitNoreturnRuntimeCallOrInvoke(llvm::Value *callee, - ArrayRef<llvm::Value*> args); + void EmitNoreturnRuntimeCallOrInvoke(llvm::FunctionCallee callee, + ArrayRef<llvm::Value *> args); CGCallee BuildAppleKextVirtualCall(const CXXMethodDecl *MD, NestedNameSpecifier *Qual, |