forked from OSchip/llvm-project
[llvm-xray] consumeError when trying big-endian
Follow-up of rL341226. Fixes "Expected<T> must be checked before access or destruction"
This commit is contained in:
parent
8092c8fec0
commit
3dbbbcc80e
|
@ -410,6 +410,7 @@ Expected<Trace> llvm::xray::loadTraceFile(StringRef Filename, bool Sort) {
|
|||
auto TraceOrError = loadTrace(LittleEndianDE, Sort);
|
||||
if (!TraceOrError) {
|
||||
DataExtractor BigEndianDE(Data, false, 8);
|
||||
consumeError(TraceOrError.takeError());
|
||||
TraceOrError = loadTrace(BigEndianDE, Sort);
|
||||
}
|
||||
return TraceOrError;
|
||||
|
|
Loading…
Reference in New Issue