xref: /llvm-project/llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll (revision 2d56d8c4e8751c7e2cab927cdeb4e519af3f3585)
1e433cf1fSLang Hames; RUN: lli -jit-kind=orc-lazy %s
2e433cf1fSLang Hames;
37f7dac71SZarko Todorovski; Basic correctness check: We can make a call inside lazily JIT'd code.
4e433cf1fSLang Hames; Compared to minimal.ll, this demonstrates that we can call through a stub.
5e433cf1fSLang Hames
6e433cf1fSLang Hamesdefine i32 @foo() {
7e433cf1fSLang Hamesentry:
8e433cf1fSLang Hames  ret i32 0
9e433cf1fSLang Hames}
10e433cf1fSLang Hames
11*2d56d8c4SMatt Arsenaultdefine i32 @main(i32 %argc, ptr nocapture readnone %argv) {
12e433cf1fSLang Hamesentry:
13e433cf1fSLang Hames  %0 = call i32() @foo()
14e433cf1fSLang Hames  ret i32 %0
15e433cf1fSLang Hames}
16