diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-05 08:22:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-05 08:22:11 +0000 |
commit | 761acc19d966a67f2175783d09412d6ac9463400 (patch) | |
tree | 393991d45df03fd98ab66808e63b08ffbc672a17 /lib/CodeGen/CodeGenFunction.h | |
parent | 10976d99e4e129dfc66c19fd425408cdd9a90268 (diff) |
implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 8a386dec8c..1a49c944a2 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -1076,9 +1076,18 @@ public: /// CreateStaticBlockVarDecl - Create a zero-initialized LLVM global for a /// static block var decl. - llvm::GlobalVariable * CreateStaticBlockVarDecl(const VarDecl &D, - const char *Separator, + llvm::GlobalVariable *CreateStaticBlockVarDecl(const VarDecl &D, + const char *Separator, llvm::GlobalValue::LinkageTypes Linkage); + + /// AddInitializerToGlobalBlockVarDecl - Add the initializer for 'D' to the + /// global variable that has already been created for it. If the initializer + /// has a different type than GV does, this may free GV and return a different + /// one. Otherwise it just returns GV. + llvm::GlobalVariable * + AddInitializerToGlobalBlockVarDecl(const VarDecl &D, + llvm::GlobalVariable *GV); + /// EmitStaticCXXBlockVarDeclInit - Create the initializer for a C++ runtime /// initialized static block var decl. |