brintos

brintos / llvm-project-archived public Read only

0
0
Text · 767 B · 1df0cf4 Raw
20 lines · plain
1; RUN: rm -rf %t && mkdir %t2; RUN: yaml2obj -o %t/libFoo.dylib %S/Inputs/MachO_Universal_libFoo_dylib.yaml3; RUN: llc -filetype=obj -mtriple arm64e-apple-macosx -o %t/main.o %s4; RUN: llvm-jitlink -noexec -triple arm64e-apple-macosx %t/main.o -weak_library \5; RUN:     %t/libFoo.dylib6;7; REQUIRES: x86-registered-target && aarch64-registered-target8;9; Check MachO universal binary handling in the orc::getDylibInterfaceFromDylib10; function, including that the cpusubtype field is masked correctly (for arm64e11; slices this field will have the MachO::CPU_SUBTYPE_LIB64 flag set in the high12; bits -- the subtype will fail to match unless it's masked out).13 14declare i32 @foo()15 16define i32 @main(i32 %argc, ptr %argv) {17entry:18  ret i32 ptrtoint (ptr @foo to i32)19}20