Copy the ThreadLocalMode in GlobalVariable::copyAttributesFrom
authorHans Wennborg <hans@hanshq.net>
Mon, 10 Feb 2014 17:13:56 +0000 (17:13 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 10 Feb 2014 17:13:56 +0000 (17:13 +0000)
This fixes the oversight from r159077.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201098 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Globals.cpp

index cc42351..4d8b9ce 100644 (file)
@@ -184,7 +184,7 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) {
   assert(isa<GlobalVariable>(Src) && "Expected a GlobalVariable!");
   GlobalValue::copyAttributesFrom(Src);
   const GlobalVariable *SrcVar = cast<GlobalVariable>(Src);
-  setThreadLocal(SrcVar->isThreadLocal());
+  setThreadLocalMode(SrcVar->getThreadLocalMode());
 }