Fix build with -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_USE_OPROFILE=ON.
[oota-llvm.git] / lib / ExecutionEngine / IntelJITEvents / IntelJITEventListener.cpp
index 907144007fdd52035c9d068d9a8fc663903146fd..4e7d209b7b414ba6bc6db9094345bda86df3518f 100644 (file)
@@ -118,9 +118,10 @@ void IntelJITEventListener::NotifyObjectEmitted(
       if (!Name)
         continue;
 
-      uint64_t Addr;
-      if (Sym.getAddress(Addr))
+      ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
+      if (AddrOrErr.getError())
         continue;
+      uint64_t Addr = *AddrOrErr;
       uint64_t Size = P.second;
 
       // Record this address in a local vector