Home | History | Annotate | Download | only in X86
      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 }]
      5 
      6 @v = weak_odr global i8 0
      7 
      8 define void @f() {
      9 entry:
     10   ret void
     11 }
     12 
     13 define void @g() {
     14 entry:
     15   ret void
     16 }
     17 
     18 ; CTOR:		.section	.ctors.65520,"aGw",@progbits,v,comdat
     19 ; CTOR-NEXT:	.align	8
     20 ; CTOR-NEXT:	.quad	g
     21 ; CTOR-NEXT:	.section	.ctors,"aw",@progbits
     22 ; CTOR-NEXT:	.align	8
     23 ; CTOR-NEXT:	.quad	f
     24 
     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
     31 
     32 ; NACL:		.section	.init_array.15,"aGw",@init_array,v,comdat
     33 ; NACL-NEXT:	.align	4
     34 ; NACL-NEXT:	.long	g
     35 ; NACL-NEXT:	.section	.init_array,"aw",@init_array
     36 ; NACL-NEXT:	.align	4
     37 ; NACL-NEXT:	.long	f
     38