]> granicus.if.org Git - clang/commit
Simplify the logic for emitting guard variables for template static
authorJohn McCall <rjmccall@apple.com>
Sat, 6 Nov 2010 09:44:32 +0000 (09:44 +0000)
committerJohn McCall <rjmccall@apple.com>
Sat, 6 Nov 2010 09:44:32 +0000 (09:44 +0000)
commit3030eb82593097502469a8b3fc26112c79c75605
tree4bebde66f116b99a8a45232887b9bc3ff7cdba48
parentbb6afcb7f5f9c2e9121a548726d6d03283cb52bc
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCXX.cpp
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/static-data-member.cpp