summaryrefslogtreecommitdiff
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-08-05 18:19:40 +0000
committerKevin Enderby <enderby@apple.com>2016-08-05 18:19:40 +0000
commitcedb0b6b7e2fb9446ef9a34706f68a9f70c32a43 (patch)
treec346cafba16c820f3b88d6adcad08a32ac2f96b1 /tools/llvm-nm
parent9fb630e4f04d77aa6da9baee1a26fa2072bc2a21 (diff)
Add the first of what will be a long line of additional error checks for invalid Mach-O files.
This is where an LC_SEGMENT load command has a fileoff field that extends past the end of the file. Also fix llvm-nm and llvm-size to remove the errorToErrorCode() call so error messages are printed. And needed to update a few test cases now that they do print the error messages just a bit differently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index af3d7db1dda..7eb937453ac 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -1085,7 +1085,7 @@ static void dumpSymbolNamesFromFile(std::string &Filename) {
Expected<std::unique_ptr<Binary>> BinaryOrErr = createBinary(
BufferOrErr.get()->getMemBufferRef(), NoLLVMBitcode ? nullptr : &Context);
if (!BinaryOrErr) {
- error(errorToErrorCode(BinaryOrErr.takeError()), Filename);
+ error(BinaryOrErr.takeError(), Filename);
return;
}
Binary &Bin = *BinaryOrErr.get();