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 | e99c110d06545a8051c5fe47b844ed7fc1bfb96f (patch) | |
tree | 687ff93fbb8a00168a55facbacd8d2a18dfa9cb3 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | e08ea7874a5ee932d874596e51f84d9c8d9046fe (diff) | |
download | bcm5719-llvm-e99c110d06545a8051c5fe47b844ed7fc1bfb96f.tar.gz bcm5719-llvm-e99c110d06545a8051c5fe47b844ed7fc1bfb96f.zip |
implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.
llvm-svn: 90658
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 8a386dec8cc..1a49c944a2e 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/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. |