1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN
2 ; RUN: llc < %s -mtriple=arm-apple-darwin -disable-atexit-based-global-dtor-lowering | FileCheck %s -check-prefix=DARWIN-LEGACY
3 ; RUN: llc < %s -mtriple=arm-linux-gnu -target-abi=apcs | FileCheck %s -check-prefix=ELF
4 ; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s -check-prefix=GNUEABI
6 ; DARWIN: l_register_call_dtors:
7 ; DARWIN: bl ___cxa_atexit
8 ; DARWIN: .section __DATA,__mod_init_func,mod_init_funcs
9 ; DARWIN-NOT: __mod_term_func
11 ; DARWIN-LEGACY-NOT: atexit
12 ; DARWIN-LEGACY: .section __DATA,__mod_init_func,mod_init_funcs
13 ; DARWIN-LEGACY: .section __DATA,__mod_term_func,mod_term_funcs
15 ; ELF: .section .ctors,"aw",%progbits
16 ; ELF: .section .dtors,"aw",%progbits
18 ; GNUEABI: .section .init_array,"aw",%init_array
19 ; GNUEABI: .section .fini_array,"aw",%fini_array
21 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [ { i32, ptr, ptr } { i32 65535, ptr @__mf_init, ptr null } ] ; <ptr> [#uses=0]
22 @llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [ { i32, ptr, ptr } { i32 65535, ptr @__mf_fini, ptr null } ] ; <ptr> [#uses=0]
24 define void @__mf_init() {
29 define void @__mf_fini() {