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 | 5ff2d5defab20aa5061d42996c3911cbe4488ba3 (patch) | |
| tree | 5d9f6a00b0d9fb0b2ff806cfcb4653e58291d22d /clang/CodeGen/CodeGenModule.h | |
| parent | 5be52a605392d46c55bf216ce87a7f26e48e94c8 (diff) | |
| download | bcm5719-llvm-5ff2d5defab20aa5061d42996c3911cbe4488ba3.tar.gz bcm5719-llvm-5ff2d5defab20aa5061d42996c3911cbe4488ba3.zip | |
add initial support for generating an llvm.globalctors list. Patch by David Chisnall
llvm-svn: 48362
Diffstat (limited to 'clang/CodeGen/CodeGenModule.h')
| -rw-r--r-- | clang/CodeGen/CodeGenModule.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenModule.h b/clang/CodeGen/CodeGenModule.h index 80ce3076d41..cbea09fd3ec 100644 --- a/clang/CodeGen/CodeGenModule.h +++ b/clang/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); |

