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/CodeGenModule.cpp | |
parent | d9c9dc036ca5ea98de431e6a2c1a3c90e139e9b5 (diff) | |
download | bcm5719-llvm-9871db064d3ee0d364d4d50a9f95e5d51804e19b.tar.gz bcm5719-llvm-9871db064d3ee0d364d4d50a9f95e5d51804e19b.zip |
[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/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index dfc3dd2506d..5f1e6568388 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2974,7 +2974,7 @@ GetRuntimeFunctionDecl(ASTContext &C, StringRef Name) { /// CreateRuntimeFunction - Create a new runtime function with the specified /// type and name. -llvm::Constant * +llvm::FunctionCallee CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, llvm::AttributeList ExtraAttrs, bool Local) { @@ -3000,15 +3000,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } - return C; -} - -/// CreateBuiltinFunction - Create a new builtin function with the specified -/// type and name. -llvm::Constant * -CodeGenModule::CreateBuiltinFunction(llvm::FunctionType *FTy, StringRef Name, - llvm::AttributeList ExtraAttrs) { - return CreateRuntimeFunction(FTy, Name, ExtraAttrs, true); + return {FTy, C}; } /// isTypeConstant - Determine whether an object of this type can be emitted |