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
auto Objects = ObjectEntry->getObjectsAs<MachOObjectFile>();
if (!Objects) {
- return errorToErrorCode(ObjectEntry.takeError());
+ return errorToErrorCode(Objects.takeError());
}
std::vector<std::unique_ptr<DebugMap>> Results;