summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-size/llvm-size.cpp
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
commit600fb3f28eb5e1a3ad5e04118e74cdd65def4aa3 (patch)
tree82243b582e31930d055fd580daeff2a8f3c1f75b /llvm/tools/llvm-size/llvm-size.cpp
parent0f4f0c5d5378703a7d0156120ddf75e3546e41b1 (diff)
downloadbcm5719-llvm-600fb3f28eb5e1a3ad5e04118e74cdd65def4aa3.tar.gz
bcm5719-llvm-600fb3f28eb5e1a3ad5e04118e74cdd65def4aa3.zip
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. llvm-svn: 277845
Diffstat (limited to 'llvm/tools/llvm-size/llvm-size.cpp')
-rw-r--r--llvm/tools/llvm-size/llvm-size.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-size/llvm-size.cpp b/llvm/tools/llvm-size/llvm-size.cpp
index 4ecfcc2df10..8da0ec677cb 100644
--- a/llvm/tools/llvm-size/llvm-size.cpp
+++ b/llvm/tools/llvm-size/llvm-size.cpp
@@ -521,7 +521,7 @@ static void printFileSectionSizes(StringRef file) {
// Attempt to open the binary.
Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(file);
if (!BinaryOrErr) {
- error(errorToErrorCode(BinaryOrErr.takeError()));
+ error(BinaryOrErr.takeError(), file);
return;
}
Binary &Bin = *BinaryOrErr.get().getBinary();
OpenPOWER on IntegriCloud