mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Copy externally_initialized in GlobalVariable::copyAttributesFrom.
Patch by Kevin Frei! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221620 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26e0544c0a
commit
b3da08deb3
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
7
test/Linker/lto-attributes.ll
Normal file
7
test/Linker/lto-attributes.ll
Normal 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user