aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-19 16:42:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-19 16:42:07 +0000
commitb80a16eadd0dacabfc1c32412e243ccb99dd664d (patch)
treea32d6882fb51f1dac98aa71110dad1c40b9aa6ca /lib/CodeGen/CodeGenModule.h
parent044fe23e79fff3841cc4c315f8c97e1cdccdd8dd (diff)
Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 1a803f38c0..0f4fe8ae51 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -317,6 +317,14 @@ class CodeGenModule : public CodeGenTypeCache {
llvm::GlobalValue *> StaticExternCMap;
StaticExternCMap StaticExternCValues;
+ /// \brief thread_local variables defined or used in this TU.
+ std::vector<std::pair<const VarDecl *, llvm::GlobalVariable *> >
+ CXXThreadLocals;
+
+ /// \brief thread_local variables with initializers that need to run
+ /// before any thread_local variable in this TU is odr-used.
+ std::vector<llvm::Constant*> CXXThreadLocalInits;
+
/// CXXGlobalInits - Global variables with initializers that need to run
/// before main.
std::vector<llvm::Constant*> CXXGlobalInits;
@@ -1026,6 +1034,9 @@ private:
/// a C++ destructor Decl.
void EmitCXXDestructor(const CXXDestructorDecl *D, CXXDtorType Type);
+ /// \brief Emit the function that initializes C++ thread_local variables.
+ void EmitCXXThreadLocalInitFunc();
+
/// EmitCXXGlobalInitFunc - Emit the function that initializes C++ globals.
void EmitCXXGlobalInitFunc();