1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Copy externally_initialized in GlobalVariable::copyAttributesFrom.

Patch by Kevin Frei!

llvm-svn: 221620
This commit is contained in:
Rafael Espindola 2014-11-10 18:41:59 +00:00
parent 74a580e42d
commit 95378f1d72
2 changed files with 8 additions and 0 deletions

View File

@ -246,6 +246,7 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) {
GlobalObject::copyAttributesFrom(Src);
const GlobalVariable *SrcVar = cast<GlobalVariable>(Src);
setThreadLocalMode(SrcVar->getThreadLocalMode());
setExternallyInitialized(SrcVar->isExternallyInitialized());
}

View File

@ -0,0 +1,7 @@
; RUN: llvm-link -S %s -o - | FileCheck %s
; CHECK: @foo = private externally_initialized global i8* null
@foo = private externally_initialized global i8* null
; CHECK: @array = appending global [7 x i8] c"abcdefg", align 1
@array = appending global [7 x i8] c"abcdefg", align 1