forked from OSchip/llvm-project
Add null check to Intel JIT event listener
llvm-svn: 334544
This commit is contained in:
parent
8e42bfd41c
commit
722e2ea247
|
@ -101,15 +101,17 @@ void IntelJITEventListener::NotifyObjectEmitted(
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue