mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[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
c3f9b65b2c
commit
b7d2d21a27
@ -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
Block a user