diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-14 17:18:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-14 17:18:18 +0000 |
commit | 6d39760673df2e92d9293f46ff8c66dad6ab5e0a (patch) | |
tree | 1997d5fac9dae1aa2a7ed4fba0a5f51831f32647 /CodeGen/CodeGenModule.h | |
parent | 1121519f279d0e2168dbcb6428f8e274fd46e9be (diff) |
add initial support for generating an llvm.globalctors list. Patch by David Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenModule.h')
-rw-r--r-- | CodeGen/CodeGenModule.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CodeGen/CodeGenModule.h b/CodeGen/CodeGenModule.h index 80ce3076d4..cbea09fd3e 100644 --- a/CodeGen/CodeGenModule.h +++ b/CodeGen/CodeGenModule.h @@ -58,6 +58,7 @@ class CodeGenModule { llvm::Function *MemCpyFn; llvm::Function *MemSetFn; llvm::DenseMap<const Decl*, llvm::Constant*> GlobalDeclMap; + std::vector<llvm::Constant*> GlobalCtors; llvm::StringMap<llvm::Constant*> CFConstantStringMap; llvm::StringMap<llvm::Constant*> ConstantStringMap; @@ -96,6 +97,9 @@ public: llvm::Function *getIntrinsic(unsigned IID, const llvm::Type **Tys = 0, unsigned NumTys = 0); + void AddGlobalCtor(llvm::Function * Ctor); + void EmitGlobalCtors(void); + void EmitFunction(const FunctionDecl *FD); void EmitGlobalVar(const FileVarDecl *D); void EmitGlobalVarDeclarator(const FileVarDecl *D); |