summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-06-12 20:54:11 +0000
committerReid Kleckner <rnk@google.com>2018-06-12 20:54:11 +0000
commit722e2ea247b2ea914afe59a9807b01b8fa4f55cb (patch)
tree256d6498228f930f94cf609a3014b3ed95d808ba
parent8e42bfd41cf353236bfb5beef7e2b8d3a0f51687 (diff)
downloadbcm5719-llvm-722e2ea247b2ea914afe59a9807b01b8fa4f55cb.tar.gz
bcm5719-llvm-722e2ea247b2ea914afe59a9807b01b8fa4f55cb.zip
Add null check to Intel JIT event listener
llvm-svn: 334544
-rw-r--r--llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
index a9b9a63da5a..211f5216811 100644
--- a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
@@ -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;
OpenPOWER on IntegriCloud