Add an error check in JITAnnouncer event listener

This is a bit strange one.
This commit is contained in:
Nekotekina 2021-12-26 19:21:50 +03:00
parent d836033212
commit 122555fb66

View File

@ -424,6 +424,14 @@ struct JITAnnouncer : llvm::JITEventListener
using namespace llvm;
object::OwningBinary<object::ObjectFile> 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))