[llvm] eb61ab1 - Fix a copy and paste error that would cause a crash.
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 18:07:45 PST 2020
Author: Greg Clayton
Date: 2020-03-06T18:07:36-08:00
New Revision: eb61ab1bd9af607fc7439edd3b92467b78772b92
URL: https://github.com/llvm/llvm-project/commit/eb61ab1bd9af607fc7439edd3b92467b78772b92
DIFF: https://github.com/llvm/llvm-project/commit/eb61ab1bd9af607fc7439edd3b92467b78772b92.diff
LOG: Fix a copy and paste error that would cause a crash.
Summary: The wrong variable was being checked for an error, which mean a llvm::Error went unchecked and crashes dsymutil. Discovered this when trying to feed an ELF file to "dsymutil --update" and running into the crash.
Reviewers: aprantl, JDevlieghere
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75777
Added:
Modified:
llvm/tools/dsymutil/MachODebugMapParser.cpp
Removed:
################################################################################
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp
index 83703fb13f0a..a9d6c876860c 100644
--- a/llvm/tools/dsymutil/MachODebugMapParser.cpp
+++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp
@@ -383,7 +383,7 @@ ErrorOr<std::vector<std::unique_ptr<DebugMap>>> MachODebugMapParser::parse() {
auto Objects = ObjectEntry->getObjectsAs<MachOObjectFile>();
if (!Objects) {
- return errorToErrorCode(ObjectEntry.takeError());
+ return errorToErrorCode(Objects.takeError());
}
std::vector<std::unique_ptr<DebugMap>> Results;
More information about the llvm-commits
mailing list