Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.268 -> 1.269 Globals.cpp updated: 1.18 -> 1.19 --- Log message: Implement the "thread_local" keyword. --- Diffs of the changes: (+8 -7) AsmWriter.cpp | 3 ++- Globals.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.268 llvm/lib/VMCore/AsmWriter.cpp:1.269 --- llvm/lib/VMCore/AsmWriter.cpp:1.268 Tue Apr 10 21:44:19 2007 +++ llvm/lib/VMCore/AsmWriter.cpp Thu Apr 12 13:32:50 2007 @@ -878,7 +878,8 @@ case GlobalValue::HiddenVisibility: Out << "hidden "; break; } } - + + if (GV->isThreadLocal()) Out << "thread_local "; Out << (GV->isConstant() ? "constant " : "global "); printType(GV->getType()->getElementType()); Index: llvm/lib/VMCore/Globals.cpp diff -u llvm/lib/VMCore/Globals.cpp:1.18 llvm/lib/VMCore/Globals.cpp:1.19 --- llvm/lib/VMCore/Globals.cpp:1.18 Sun Feb 25 23:02:39 2007 +++ llvm/lib/VMCore/Globals.cpp Thu Apr 12 13:32:50 2007 @@ -81,11 +81,11 @@ //===----------------------------------------------------------------------===// 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, - 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!"); _______________________________________________ llvm-commits mailing list [EMAIL PROTECTED] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits