1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %s %p/Inputs/ctors.ll -S -o - | \ 2*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK1 %s 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %p/Inputs/ctors.ll %s -S -o - | \ 4*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=ALL --check-prefix=CHECK2 %s 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; Test the bitcode writer too. It used to crash. 7*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %s %p/Inputs/ctors.ll -o %t.bc 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker@v = weak global i8 0 10*9880d681SAndroid Build Coastguard Worker; CHECK1: @v = weak global i8 0 11*9880d681SAndroid Build Coastguard Worker; CHECK2: @v = weak global i8 1 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }] 14*9880d681SAndroid Build Coastguard Worker; ALL: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }] 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdefine weak void @f() { 17*9880d681SAndroid Build Coastguard Worker ret void 18*9880d681SAndroid Build Coastguard Worker} 19