Home | History | Annotate | Download | only in OrcLazy
      1 ; RUN: lli -jit-kind=orc-lazy -orc-lazy-debug=funcs-to-stdout %s | FileCheck %s
      2 ;
      3 ; CHECK: Hello
      4 ; CHECK: [ {{.*}}main$orc_body ]
      5 ; CHECK: Goodbye
      6 
      7 %class.Foo = type { i8 }
      8 
      9 @f = global %class.Foo zeroinitializer, align 1
     10 @__dso_handle = external global i8
     11 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_hello.cpp, i8* null }]
     12 @str = private unnamed_addr constant [6 x i8] c"Hello\00"
     13 @str2 = private unnamed_addr constant [8 x i8] c"Goodbye\00"
     14 
     15 define linkonce_odr void @_ZN3FooD1Ev(%class.Foo* nocapture readnone %this) unnamed_addr align 2 {
     16 entry:
     17   %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str2, i64 0, i64 0))
     18   ret void
     19 }
     20 
     21 declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
     22 
     23 define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
     24 entry:
     25   ret i32 0
     26 }
     27 
     28 define internal void @_GLOBAL__sub_I_hello.cpp() {
     29 entry:
     30   %puts.i.i.i = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
     31   %0 = tail call i32 @__cxa_atexit(void (i8*)* bitcast (void (%class.Foo*)* @_ZN3FooD1Ev to void (i8*)*), i8* getelementptr inbounds (%class.Foo, %class.Foo* @f, i64 0, i32 0), i8* @__dso_handle)
     32   ret void
     33 }
     34 
     35 declare i32 @puts(i8* nocapture readonly)
     36