aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/OrcLazy/hello.ll
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-05-06 11:46:36 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-05-18 10:52:30 -0700
commit2c3e0051c31c3f5b2328b447eadf1cf9c4427442 (patch)
treec0104029af14e9f47c2ef58ca60e6137691f3c9b /test/ExecutionEngine/OrcLazy/hello.ll
parente1bc145815f4334641be19f1c45ecf85d25b6e5a (diff)
downloadexternal_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.zip
external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.gz
external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.bz2
Update aosp/master LLVM for rebase to r235153
Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
Diffstat (limited to 'test/ExecutionEngine/OrcLazy/hello.ll')
-rw-r--r--test/ExecutionEngine/OrcLazy/hello.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/ExecutionEngine/OrcLazy/hello.ll b/test/ExecutionEngine/OrcLazy/hello.ll
new file mode 100644
index 0000000..795224e
--- /dev/null
+++ b/test/ExecutionEngine/OrcLazy/hello.ll
@@ -0,0 +1,35 @@
+; RUN: lli -jit-kind=orc-lazy -orc-lazy-debug=funcs-to-stdout %s | FileCheck %s
+;
+; CHECK: Hello
+; CHECK: [ {{.*}}main$orc_body ]
+; CHECK: Goodbye
+
+%class.Foo = type { i8 }
+
+@f = global %class.Foo zeroinitializer, align 1
+@__dso_handle = external global i8
+@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_hello.cpp, i8* null }]
+@str = private unnamed_addr constant [6 x i8] c"Hello\00"
+@str2 = private unnamed_addr constant [8 x i8] c"Goodbye\00"
+
+define linkonce_odr void @_ZN3FooD1Ev(%class.Foo* nocapture readnone %this) unnamed_addr align 2 {
+entry:
+ %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str2, i64 0, i64 0))
+ ret void
+}
+
+declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
+
+define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+entry:
+ ret i32 0
+}
+
+define internal void @_GLOBAL__sub_I_hello.cpp() {
+entry:
+ %puts.i.i.i = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
+ %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)
+ ret void
+}
+
+declare i32 @puts(i8* nocapture readonly)