[llvm] r334544 - Add null check to Intel JIT event listener
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 13:54:11 PDT 2018
Author: rnk
Date: Tue Jun 12 13:54:11 2018
New Revision: 334544
URL: http://llvm.org/viewvc/llvm-project?rev=334544&view=rev
Log:
Add null check to Intel JIT event listener
Modified:
llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
Modified: llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp?rev=334544&r1=334543&r2=334544&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Tue Jun 12 13:54:11 2018
@@ -101,15 +101,17 @@ void IntelJITEventListener::NotifyObject
const RuntimeDyld::LoadedObjectInfo &L) {
OwningBinary<ObjectFile> DebugObjOwner = L.getObjectForDebug(Obj);
- const ObjectFile &DebugObj = *DebugObjOwner.getBinary();
+ const ObjectFile *DebugObj = DebugObjOwner.getBinary();
+ if (!DebugObj)
+ return;
// Get the address of the object image for use as a unique identifier
- const void* ObjData = DebugObj.getData().data();
- std::unique_ptr<DIContext> Context = DWARFContext::create(DebugObj);
+ const void* ObjData = DebugObj->getData().data();
+ std::unique_ptr<DIContext> Context = DWARFContext::create(*DebugObj);
MethodAddressVector Functions;
// Use symbol info to iterate functions in the object.
- for (const std::pair<SymbolRef, uint64_t> &P : computeSymbolSizes(DebugObj)) {
+ for (const std::pair<SymbolRef, uint64_t> &P : computeSymbolSizes(*DebugObj)) {
SymbolRef Sym = P.first;
std::vector<LineNumberInfo> LineInfo;
std::string SourceFileName;
More information about the llvm-commits
mailing list