mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Error on linking appending globals with different unnamed_addr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf34f34642
commit
9127334dad
@ -704,7 +704,11 @@ bool ModuleLinker::linkAppendingVarProto(GlobalVariable *DstGV,
|
||||
if (DstGV->getVisibility() != SrcGV->getVisibility())
|
||||
return emitError(
|
||||
"Appending variables with different visibility need to be linked!");
|
||||
|
||||
|
||||
if (DstGV->hasUnnamedAddr() != SrcGV->hasUnnamedAddr())
|
||||
return emitError(
|
||||
"Appending variables with different unnamed_addr need to be linked!");
|
||||
|
||||
if (DstGV->getSection() != SrcGV->getSection())
|
||||
return emitError(
|
||||
"Appending variables with different section name need to be linked!");
|
||||
|
4
test/Linker/unnamed-addr-err-a.ll
Normal file
4
test/Linker/unnamed-addr-err-a.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; RUN: not llvm-link %s %p/unnamed-addr-err-b.ll -S -o - 2>&1 | FileCheck %s
|
||||
|
||||
@foo = appending unnamed_addr global [1 x i32] [i32 42]
|
||||
; CHECK: Appending variables with different unnamed_addr need to be linked
|
4
test/Linker/unnamed-addr-err-b.ll
Normal file
4
test/Linker/unnamed-addr-err-b.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; This file is for use with unnamed-addr-err-a.ll
|
||||
; RUN: true
|
||||
|
||||
@foo = appending global [1 x i32] [i32 42]
|
Loading…
Reference in New Issue
Block a user