1; RUN: %lli -jit-kind=orc-mcjit %s 2 3; This test is intended to verify that a function weakly defined in 4; JITted code, and strongly defined in the main executable, can be 5; correctly resolved when called from elsewhere in JITted code. 6 7; This test makes the assumption that the lli executable in compiled 8; to export symbols (e.g. --export-dynamic), and that is actually does 9; contain the symbol LLVMInitializeCodeGen. (Note that this function 10; is not actually called by the test. The test simply verifes that 11; the reference can be resolved without relocation errors.) 12 13define linkonce_odr void @LLVMInitializeCodeGen() { 14entry: 15 ret void 16} 17 18define void @test() { 19entry: 20 call void @LLVMInitializeCodeGen() 21 ret void 22} 23 24define i32 @main() { 25entry: 26 ret i32 0 27} 28 29