1
Fork 0

Update the minimum external LLVM to 18

This commit is contained in:
Josh Stone 2024-09-17 12:37:45 -07:00
parent f79a912d9e
commit 6fd8a50680
57 changed files with 89 additions and 401 deletions

View file

@ -150,11 +150,9 @@ extern "C" bool LLVMRustIsECObject(char *BufPtr, size_t BufLen) {
return cast<llvm::object::COFFObjectFile>(&*Obj)->getMachine() !=
COFF::IMAGE_FILE_MACHINE_ARM64;
#if LLVM_VERSION_GE(18, 0)
if (Obj->isCOFFImportFile())
return cast<llvm::object::COFFImportFile>(&*Obj)->getMachine() !=
COFF::IMAGE_FILE_MACHINE_ARM64;
#endif
if (Obj->isIR()) {
Expected<std::string> TripleStr =