diff options
| author | John McCall <rjmccall@apple.com> | 2012-03-30 07:09:50 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2012-03-30 07:09:50 +0000 |
| commit | 87590e60c088355ed0227da12f0ca04928b1e28f (patch) | |
| tree | c32befa3a8dbd26e95c4cdd3ec2092c569215b23 /clang/lib/CodeGen/CodeGenFunction.h | |
| parent | 74c17c65e4f3627baa993ea621f22b1197559381 (diff) | |
| download | bcm5719-llvm-87590e60c088355ed0227da12f0ca04928b1e28f.tar.gz bcm5719-llvm-87590e60c088355ed0227da12f0ca04928b1e28f.zip | |
Do the static-locals thing properly in the face of unions and
other things which might mess with the variable's type.
llvm-svn: 153733
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 85cbd143d89..02346cf026a 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2392,17 +2392,17 @@ public: /// CreateStaticVarDecl - Create a zero-initialized LLVM global for /// a static local variable. - llvm::GlobalVariable *CreateStaticVarDecl(const VarDecl &D, - const char *Separator, - llvm::GlobalValue::LinkageTypes Linkage); + llvm::Constant *CreateStaticVarDecl(const VarDecl &D, + const char *Separator, + llvm::GlobalValue::LinkageTypes Linkage); - /// AddInitializerToStaticVarDecl - 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 * - AddInitializerToStaticVarDecl(const VarDecl &D, - llvm::GlobalVariable *GV); + /// AddInitializerToStaticVarDecl - 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 + /// force the underlying variable to change. Otherwise it just + /// returns it. + llvm::Constant * + AddInitializerToStaticVarDecl(const VarDecl &D, llvm::Constant *GV); /// EmitCXXGlobalVarDeclInit - Create the initializer for a C++ @@ -2420,7 +2420,7 @@ public: /// possible to prove that an initialization will be done exactly /// once, e.g. with a static local variable or a static data member /// of a class template. - void EmitCXXGuardedInit(const VarDecl &D, llvm::GlobalVariable *DeclPtr, + void EmitCXXGuardedInit(const VarDecl &D, llvm::Constant *addr, bool PerformInit); /// GenerateCXXGlobalInitFunc - Generates code for initializing global |

