From c4b5d794f1fe2ebb3a3c770d978d7cc7fe389b91 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 3 Apr 2017 23:58:15 +0000 Subject: [codeview] Cope with unsorted streams in type merging Summary: MASM can produce type streams that are not topologically sorted. It can even produce type streams with circular references, but those are not common in practice. Reviewers: inglorion, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31629 llvm-svn: 299403 --- llvm/tools/llvm-readobj/COFFDumper.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/tools/llvm-readobj') diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 3c6ab1f5f7f..9836c137ed2 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -1088,10 +1088,8 @@ void COFFDumper::mergeCodeViewTypes(TypeTableBuilder &CVIDs, error(object_error::parse_failed); } - if (auto EC = mergeTypeStreams(CVIDs, CVTypes, nullptr, Types)) { - consumeError(std::move(EC)); - return error(object_error::parse_failed); - } + if (auto EC = mergeTypeStreams(CVIDs, CVTypes, nullptr, Types)) + return error(std::move(EC)); } } } @@ -1575,7 +1573,7 @@ void llvm::dumpCodeViewMergedTypes(ScopedPrinter &Writer, if (auto EC = CVTD.dump( {TypeBuf.str().bytes_begin(), TypeBuf.str().bytes_end()}, TDV)) { Writer.flush(); - error(llvm::errorToErrorCode(std::move(EC))); + error(std::move(EC)); } } @@ -1595,7 +1593,7 @@ void llvm::dumpCodeViewMergedTypes(ScopedPrinter &Writer, if (auto EC = CVTD.dump( {IDBuf.str().bytes_begin(), IDBuf.str().bytes_end()}, TDV)) { Writer.flush(); - error(llvm::errorToErrorCode(std::move(EC))); + error(std::move(EC)); } } } -- cgit v1.2.3