2014-09-05 21:27:52 +00:00
|
|
|
; 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
|
|
|
|
|
2015-11-29 03:21:30 +00:00
|
|
|
; Test the bitcode writer too. It used to crash.
|
2015-11-30 20:36:23 +00:00
|
|
|
; RUN: llvm-link %s %p/Inputs/ctors.ll -o %t.bc
|
2015-11-29 03:21:30 +00:00
|
|
|
|
2014-09-05 21:27:52 +00:00
|
|
|
@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
|
|
|
|
}
|