blob: 4d5f8d7857c05fe5070e3f07e5fde5645c75785f [file] [log] [blame]
Duncan Sands147272b2011-09-02 18:07:19 +00001; RUN: llc < %s -mtriple=i386-linux-gnu | FileCheck %s --check-prefix=CHECK-DEFAULT
2; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s --check-prefix=CHECK-DARWIN
Duncan Sandsfd9c4f72011-08-28 13:17:22 +00003; PR5329
4
5@llvm.global_ctors = appending global [3 x { i32, void ()* }] [{ i32, void ()* } { i32 2000, void ()* @construct_2 }, { i32, void ()* } { i32 3000, void ()* @construct_3 }, { i32, void ()* } { i32 1000, void ()* @construct_1 }]
Anton Korobeynikov4a99f592012-01-25 22:24:19 +00006; CHECK-DEFAULT .section .ctors.64535,"aw",@progbits
7; CHECK-DEFAULT: .long construct_1
8; CHECK-DEFAULT: .section .ctors.63535,"aw",@progbits
9; CHECK-DEFAULT: .long construct_2
10; CHECK-DEFAULT: .section .ctors.62535,"aw",@progbits
11; CHECK-DEFAULT: .long construct_3
Duncan Sands147272b2011-09-02 18:07:19 +000012
Anton Korobeynikov4a99f592012-01-25 22:24:19 +000013; CHECK-DARWIN: .long _construct_1
14; CHECK-DARWIN-NEXT: .long _construct_2
15; CHECK-DARWIN-NEXT: .long _construct_3
Duncan Sandsfd9c4f72011-08-28 13:17:22 +000016
17@llvm.global_dtors = appending global [3 x { i32, void ()* }] [{ i32, void ()* } { i32 2000, void ()* @destruct_2 }, { i32, void ()* } { i32 1000, void ()* @destruct_1 }, { i32, void ()* } { i32 3000, void ()* @destruct_3 }]
Anton Korobeynikov4a99f592012-01-25 22:24:19 +000018; CHECK-DEFAULT: .section .dtors.64535,"aw",@progbits
19; CHECK-DEFAULT: .long destruct_1
20; CHECK-DEFAULT: .section .dtors.63535,"aw",@progbits
21; CHECK-DEFAULT: .long destruct_2
22; CHECK-DEFAULT: .section .dtors.62535,"aw",@progbits
23; CHECK-DEFAULT: .long destruct_3
Duncan Sands147272b2011-09-02 18:07:19 +000024
Anton Korobeynikov4a99f592012-01-25 22:24:19 +000025; CHECK-DARWIN: .long _destruct_1
26; CHECK-DARWIN-NEXT: .long _destruct_2
27; CHECK-DARWIN-NEXT: .long _destruct_3
Duncan Sandsfd9c4f72011-08-28 13:17:22 +000028
29declare void @construct_1()
30declare void @construct_2()
31declare void @construct_3()
32declare void @destruct_1()
33declare void @destruct_2()
34declare void @destruct_3()