| Duncan Sands | 5c04c62 | 2011-09-02 18:07:19 +0000 | [diff] [blame] | 1 | ; 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 Sands | 4d63542 | 2011-08-28 13:17:22 +0000 | [diff] [blame] | 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 }] | 
| Anton Korobeynikov | 7722a2d | 2012-01-25 22:24:19 +0000 | [diff] [blame^] | 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 | 
| Duncan Sands | 5c04c62 | 2011-09-02 18:07:19 +0000 | [diff] [blame] | 12 |  | 
| Anton Korobeynikov | 7722a2d | 2012-01-25 22:24:19 +0000 | [diff] [blame^] | 13 | ; CHECK-DARWIN: .long _construct_1 | 
|  | 14 | ; CHECK-DARWIN-NEXT: .long _construct_2 | 
|  | 15 | ; CHECK-DARWIN-NEXT: .long _construct_3 | 
| Duncan Sands | 4d63542 | 2011-08-28 13:17:22 +0000 | [diff] [blame] | 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 }] | 
| Anton Korobeynikov | 7722a2d | 2012-01-25 22:24:19 +0000 | [diff] [blame^] | 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 | 
| Duncan Sands | 5c04c62 | 2011-09-02 18:07:19 +0000 | [diff] [blame] | 24 |  | 
| Anton Korobeynikov | 7722a2d | 2012-01-25 22:24:19 +0000 | [diff] [blame^] | 25 | ; CHECK-DARWIN:      .long _destruct_1 | 
|  | 26 | ; CHECK-DARWIN-NEXT: .long _destruct_2 | 
|  | 27 | ; CHECK-DARWIN-NEXT: .long _destruct_3 | 
| Duncan Sands | 4d63542 | 2011-08-28 13:17:22 +0000 | [diff] [blame] | 28 |  | 
|  | 29 | declare void @construct_1() | 
|  | 30 | declare void @construct_2() | 
|  | 31 | declare void @construct_3() | 
|  | 32 | declare void @destruct_1() | 
|  | 33 | declare void @destruct_2() | 
|  | 34 | declare void @destruct_3() |