brintos

brintos / llvm-project-archived public Read only

0
0
Text · 650 B · 80cb9e7 Raw
31 lines · plain
1; RUN: lli -jit-kind=mcjit -extra-module %p/Inputs/weak-function-2.ll %s2; RUN: lli -extra-module %p/Inputs/weak-function-2.ll %s3; UNSUPPORTED: uses_COFF4;5; Check that functions in two different modules agree on the address of weak6; function 'baz'7; Testing on COFF platforms is disabled as COFF has no representation of 'weak'8; linkage.9 10define weak i32 @baz() {11entry:12  ret i32 013}14 15define ptr @foo() {16entry:17  ret ptr @baz18}19 20declare ptr @bar()21 22define i32 @main(i32 %argc, ptr %argv) {23entry:24  %call = tail call ptr @foo()25  %call1 = tail call ptr @bar()26  %cmp = icmp ne ptr %call, %call127  %conv = zext i1 %cmp to i3228  ret i32 %conv29}30 31