1 ; RUN: llvm-link %s %p/Inputs/ctors.ll -S -o - | \
2 ; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK1 %s
3 ; RUN: llvm-link %p/Inputs/ctors.ll %s -S -o - | \
4 ; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK2 %s
6 ; Test the bitcode writer too. It used to crash.
7 ; RUN: llvm-link %s %p/Inputs/ctors.ll -o %t.bc
9 ; ALL: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
11 ; CHECK1: @v = weak global i8 0
12 ; CHECK2: @v = weak global i8 1
14 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
16 define weak void @f() {