diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-12 18:32:50 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-12 18:32:50 +0000 |
commit | c763552299165b88d34a7d4f2d76ff413cbc7f67 (patch) | |
tree | bf83c987dadf556bcc766f071383969b0812058b /lib/VMCore/Globals.cpp | |
parent | 558385fd93a89a3f2186c5c76b6735cea32ac333 (diff) | |
download | llvm-c763552299165b88d34a7d4f2d76ff413cbc7f67.tar.gz llvm-c763552299165b88d34a7d4f2d76ff413cbc7f67.tar.bz2 llvm-c763552299165b88d34a7d4f2d76ff413cbc7f67.tar.xz |
Implement the "thread_local" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Globals.cpp')
-rw-r--r-- | lib/VMCore/Globals.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp index ab1118dd0b..61d9de3a23 100644 --- a/lib/VMCore/Globals.cpp +++ b/lib/VMCore/Globals.cpp @@ -81,11 +81,11 @@ void GlobalValue::destroyConstant() { //===----------------------------------------------------------------------===// GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link, - Constant *InitVal, - const std::string &Name, Module *ParentModule) + Constant *InitVal, const std::string &Name, + Module *ParentModule, bool ThreadLocal) : GlobalValue(PointerType::get(Ty), Value::GlobalVariableVal, &Initializer, InitVal != 0, Link, Name), - isConstantGlobal(constant) { + isConstantGlobal(constant), isThreadLocalSymbol(ThreadLocal) { if (InitVal) { assert(InitVal->getType() == Ty && "Initializer should be the same type as the GlobalVariable!"); @@ -101,11 +101,11 @@ GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link, } GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link, - Constant *InitVal, - const std::string &Name, GlobalVariable *Before) + Constant *InitVal, const std::string &Name, + GlobalVariable *Before, bool ThreadLocal) : GlobalValue(PointerType::get(Ty), Value::GlobalVariableVal, &Initializer, InitVal != 0, Link, Name), - isConstantGlobal(constant) { + isConstantGlobal(constant), isThreadLocalSymbol(ThreadLocal) { if (InitVal) { assert(InitVal->getType() == Ty && "Initializer should be the same type as the GlobalVariable!"); |