Copy the ThreadLocalMode in GlobalVariable::copyAttributesFrom

This fixes the oversight from r159077.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hans Wennborg 2014-02-10 17:13:56 +00:00
parent 42faffddb9
commit 1c4554854d

View 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());
}