summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-03 23:58:15 +0000
committerReid Kleckner <rnk@google.com>2017-04-03 23:58:15 +0000
commitc4b5d794f1fe2ebb3a3c770d978d7cc7fe389b91 (patch)
tree3f98b6176fac76c33e0a1657554dc476dfb16d4f /llvm/tools
parent48a15fd9f180feb705d1d1c25b38d4f2e0c9e693 (diff)
downloadbcm5719-llvm-c4b5d794f1fe2ebb3a3c770d978d7cc7fe389b91.tar.gz
bcm5719-llvm-c4b5d794f1fe2ebb3a3c770d978d7cc7fe389b91.zip
[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
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-readobj/COFFDumper.cpp10
1 files changed, 4 insertions, 6 deletions
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));
}
}
}
OpenPOWER on IntegriCloud