From c223f39fa7b345d70894d4d11422d805b4003701 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 2 Jul 2015 21:24:12 +0000 Subject: [PATCH] Try to fix the build of IntelJITEventListener. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241301 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../IntelJITEvents/IntelJITEventListener.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp b/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp index cfb71e07bd9..907144007fd 100644 --- a/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp +++ b/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp @@ -114,10 +114,11 @@ void IntelJITEventListener::NotifyObjectEmitted( std::string SourceFileName; if (Sym.getType() == SymbolRef::ST_Function) { - StringRef Name; - uint64_t Addr; - if (Sym.getName(Name)) + ErrorOr Name = Sym.getName(); + if (!Name) continue; + + uint64_t Addr; if (Sym.getAddress(Addr)) continue; uint64_t Size = P.second; @@ -126,10 +127,8 @@ void IntelJITEventListener::NotifyObjectEmitted( Functions.push_back((void*)Addr); // Build the function loaded notification message - iJIT_Method_Load FunctionMessage = FunctionDescToIntelJITFormat(*Wrapper, - Name.data(), - Addr, - Size); + iJIT_Method_Load FunctionMessage = + FunctionDescToIntelJITFormat(*Wrapper, Name->data(), Addr, Size); if (Context) { DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size); DILineInfoTable::iterator Begin = Lines.begin();