[llvm] r266933 - Fix another compilation error from r266919 for clang-atom-d525-fedora-rel which

Kevin Enderby via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 16:10:14 PDT 2016


Author: enderby
Date: Wed Apr 20 18:10:14 2016
New Revision: 266933

URL: http://llvm.org/viewvc/llvm-project?rev=266933&view=rev
Log:
Fix another compilation error from r266919 for clang-atom-d525-fedora-rel which
is another place that libObject’s getName() for symbols returns Expected<...>
that needed to be updated.

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=266933&r1=266932&r2=266933&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Wed Apr 20 18:10:14 2016
@@ -120,9 +120,12 @@ void IntelJITEventListener::NotifyObject
     if (SymType != SymbolRef::ST_Function)
       continue;
 
-    ErrorOr<StringRef> Name = Sym.getName();
-    if (!Name)
+    Expected<StringRef> Name = Sym.getName();
+    if (!Name) {
+      // TODO: Actually report errors helpfully.
+      consumeError(Name.takeError());
       continue;
+    }
 
     ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
     if (AddrOrErr.getError())




More information about the llvm-commits mailing list