• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i386-linux-gnu -use-ctors | FileCheck %s --check-prefix=CHECK-DEFAULT
2; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s --check-prefix=CHECK-DARWIN
3; 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 }]
6; 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
12
13; CHECK-DARWIN: .long _construct_1
14; CHECK-DARWIN-NEXT: .long _construct_2
15; CHECK-DARWIN-NEXT: .long _construct_3
16
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 }]
18; 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
24
25; CHECK-DARWIN:      .long _destruct_1
26; CHECK-DARWIN-NEXT: .long _destruct_2
27; CHECK-DARWIN-NEXT: .long _destruct_3
28
29declare void @construct_1()
30declare void @construct_2()
31declare void @construct_3()
32declare void @destruct_1()
33declare void @destruct_2()
34declare void @destruct_3()
35