1 ; RUN: llc -mtriple x86_64-pc-linux -use-ctors < %s | FileCheck --check-prefix=CTOR %s
2 ; RUN: llc -mtriple x86_64-pc-linux < %s | FileCheck --check-prefix=INIT-ARRAY %s
3 ; RUN: llc -mtriple x86_64-unknown-nacl < %s | FileCheck --check-prefix=NACL %s
4 @llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* null}, { i32, void ()*, i8* } { i32 15, void ()* @g, i8* @v }]
6 @v = weak_odr global i8 0
18 ; CTOR: .section .ctors.65520,"aGw",@progbits,v,comdat
21 ; CTOR-NEXT: .section .ctors,"aw",@progbits
25 ; INIT-ARRAY: .section .init_array.15,"aGw",@init_array,v,comdat
26 ; INIT-ARRAY-NEXT: .align 8
27 ; INIT-ARRAY-NEXT: .quad g
28 ; INIT-ARRAY-NEXT: .section .init_array,"aw",@init_array
29 ; INIT-ARRAY-NEXT: .align 8
30 ; INIT-ARRAY-NEXT: .quad f
32 ; NACL: .section .init_array.15,"aGw",@init_array,v,comdat
35 ; NACL-NEXT: .section .init_array,"aw",@init_array