; RUN: lli -jit-kind=orc-lazy %s; [ $? -eq 30 ]
define i32 @baz() {
entry:
  ret i32 2
}

define i32 @bar() {
entry:
  %call = call i32 @baz()
  %mul = mul nsw i32 3, %call
  ret i32 %mul
}

define i32 @foo() {
entry:
  %call = call i32 @bar()
  %mul = mul nsw i32 5, %call
  ret i32 %mul
}

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

; RUN: sh -c 'lli -jit-kind=orc-lazy %s; echo $?' | FileCheck %s
; CHECK: {{^30$}}
define i32 @baz() {
entry:
  ret i32 2
}

define i32 @bar() {
entry:
  %call = call i32 @baz()
  %mul = mul nsw i32 3, %call
  ret i32 %mul
}

define i32 @foo() {
entry:
  %call = call i32 @bar()
  %mul = mul nsw i32 5, %call
  ret i32 %mul
}

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

Make exit-code test use same mechanism as existing one.
Make exit-code test use same mechanism as existing one.

The other version doesn't properly work with our internal test runner,
which sets pipefail.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@233188 91177308-0d34-0410-b5e6-96231b3b80d8
