aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-06 09:44:32 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-06 09:44:32 +0000
commitcdf7ef5437f2cd76bd6b0246cd11b1837d79104e (patch)
tree33ffe1037fdadbfadd82e5f2348e45edb53e4c27 /clang/lib/CodeGen/CodeGenModule.h
parent8b0a71fc315f561e3d9889c924fb2618ffdf5a27 (diff)
downloadllvm-cdf7ef5437f2cd76bd6b0246cd11b1837d79104e.zip
llvm-cdf7ef5437f2cd76bd6b0246cd11b1837d79104e.tar.gz
llvm-cdf7ef5437f2cd76bd6b0246cd11b1837d79104e.tar.bz2
Simplify the logic for emitting guard variables for template static
data members by delaying the emission of the initializer until after linkage and visibility have been set on the global. Also, don't emit a guard unless the variable actually ends up with vague linkage, and don't use thread-safe statics in any case. llvm-svn: 118336
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 681ab0a00..3a5677b 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -590,7 +590,8 @@ private:
/// EmitCXXGlobalDtorFunc - Emit the function that destroys C++ globals.
void EmitCXXGlobalDtorFunc();
- void EmitCXXGlobalVarDeclInitFunc(const VarDecl *D);
+ void EmitCXXGlobalVarDeclInitFunc(const VarDecl *D,
+ llvm::GlobalVariable *Addr);
// FIXME: Hardcoding priority here is gross.
void AddGlobalCtor(llvm::Function *Ctor, int Priority=65535);