mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
e8b19acded
When linking llvm.global_ctors with the optional third element we have to handle it specially and only copy the elements whose keys were also copied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217281 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
615 B
LLVM
16 lines
615 B
LLVM
; RUN: llvm-link %s %p/Inputs/ctors.ll -S -o - | \
|
|
; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK1 %s
|
|
; RUN: llvm-link %p/Inputs/ctors.ll %s -S -o - | \
|
|
; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK2 %s
|
|
|
|
@v = weak global i8 0
|
|
; CHECK1: @v = weak global i8 0
|
|
; CHECK2: @v = weak global i8 1
|
|
|
|
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
|
|
; ALL: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
|
|
|
|
define weak void @f() {
|
|
ret void
|
|
}
|