blob: 950de8f251d9ad9339e04d0dcac76d94242d5fdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
; Test that global constructors behind casts are run
;
; RUN: lli -jit-kind=orc %s | FileCheck %s
;
; CHECK: constructor
declare i32 @puts(ptr)
@.str = private constant [12 x i8] c"constructor\00"
@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @constructor, ptr null }]
define internal i32 @constructor() #0 {
%call = tail call i32 @puts(ptr @.str)
ret i32 0
}
define i32 @main() {
ret i32 0
}
|