diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index b43e1fdd48..7029850d25 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -424,6 +424,14 @@ struct JITAnnouncer : llvm::JITEventListener using namespace llvm; object::OwningBinary debug_obj_ = info.getObjectForDebug(obj); + if (!debug_obj_.getBinary()) + { +#ifdef __linux__ + jit_log.error("LLVM: Failed to announce JIT events (no debug object)"); +#endif + return; + } + const object::ObjectFile& debug_obj = *debug_obj_.getBinary(); for (const auto& [sym, size] : computeSymbolSizes(debug_obj))