llvm.org GIT mirror llvm / 6f34838
[llvm-bcanalyzer] Fixed error 'Expected<T> must be checked before access or destruction' After rL365286 I had failing test: LLVM :: tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll It was failing with the output: $ llvm-bcanalyzer --dump llvm/test/tools/gold/X86/v1.12/Output/thinlto_emit_linked_objects.ll.tmp3.o.thinlto.bc Expected<T> must be checked before access or destruction. Unchecked Expected<T> contained error: Unexpected end of file reading 0 of 0 bytesStack dump: Change-Id: I07e03262074ea5e0aae7a8d787d5487c87f914a2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366387 91177308-0d34-0410-b5e6-96231b3b80d8 Denis Bakhvalov a month ago
1 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
538538
539539 Error BitcodeAnalyzer::analyze(Optional O,
540540 Optional CheckHash) {
541 if (Expected H = analyzeHeader(O, Stream))
542 CurStreamType = *H;
541 Expected MaybeType = analyzeHeader(O, Stream);
542 if (!MaybeType)
543 return MaybeType.takeError();
544 else
545 CurStreamType = *MaybeType;
543546
544547 Stream.setBlockInfo(&BlockInfo);
545548