Fix lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp for r273701

and the change to libObject’s getSymbolAddress() to Expected<...> .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby 2016-06-24 22:38:30 +00:00
parent 3cc072135d
commit cf2cc47aa3

View File

@ -130,9 +130,12 @@ void IntelJITEventListener::NotifyObjectEmitted(
continue;
}
ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
if (AddrOrErr.getError())
Expected<uint64_t> AddrOrErr = Sym.getAddress();
if (!AddrOrErr) {
// TODO: Actually report errors helpfully.
consumeError(AddrOrErr.takeError());
continue;
}
uint64_t Addr = *AddrOrErr;
uint64_t Size = P.second;