aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/ExecutionEngine/Orc/trivial-call-to-function.ll
blob: 57e00a10ad4b6a3ec3ce14a6d190bdfaa9aa40d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; Check that we can execute a program that makes a single call to an external
; linkage function that returns zero.
;
; Failure may indicate a problem with branch, GOT, or PLT relocation handling
; in the JIT linker.
;
; RUN: %lli %s

define i32 @foo() {
  ret i32 0
}

define i32 @main(i32 %argc, i8** %argv) {
entry:
  %0 = call i32 @foo()
  ret i32 %0
}