diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 08:53:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 08:53:37 +0000 |
commit | 34809507232bc4c3c4840c7d092c7440219fddaf (patch) | |
tree | 913bf2b1c86fa05df8ee761f048ef219f682228d /lib/CodeGen/CodeGenModule.h | |
parent | 62b33ea51adbd0e7f2f05983e9e4a3a2b2ed26de (diff) |
simplify management of llvm::Function creation to all go through
GetAddrOfFunction. This is simpler and more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index f35aa09fef..12da8c1e34 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -178,9 +178,11 @@ public: /// given global variable. llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D); - /// GetAddrOfFunction - Return the llvm::Constant for the address of the given - /// function. - llvm::Constant *GetAddrOfFunction(const FunctionDecl *D); + /// GetAddrOfFunction - Return the address of the given function. If Ty is + /// non-null, then this function will use the specified type if it has to + /// create it. + llvm::Function *GetAddrOfFunction(const FunctionDecl *D, + const llvm::Type *Ty = 0); /// GetStringForStringLiteral - Return the appropriate bytes for a string /// literal, properly padded to match the literal type. If only the address of @@ -315,15 +317,6 @@ private: void EmitGlobalDefinition(const ValueDecl *D); - /// CreateFunctionPrototypeIR - Create a new LLVM IR Function for the given - /// decl and set attributes as appropriate. - /// - /// \arg Ty - If non-null the LLVM function type to use for the - /// decl; it is the callers responsibility to make sure this is - /// compatible with the correct type. - llvm::GlobalValue *CreateFunctionPrototypeIR(const FunctionDecl *D, - const llvm::Type *Ty); - void EmitGlobalFunctionDefinition(const FunctionDecl *D); void EmitGlobalVarDefinition(const VarDecl *D); void EmitObjCPropertyImplementations(const ObjCImplementationDecl *D); |