summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-07-19 20:47:07 +0000
committerKevin Enderby <enderby@apple.com>2016-07-19 20:47:07 +0000
commit6524bd8c00a3c7339171cdcebda0ad95116c5f81 (patch)
tree0d5e7e7cf894908332813f9999bf0fe6542ed253 /llvm/tools/llvm-ar
parent47c04f9543c3d4c3c4d30bd8942a0bd99d4c712b (diff)
downloadbcm5719-llvm-6524bd8c00a3c7339171cdcebda0ad95116c5f81.tar.gz
bcm5719-llvm-6524bd8c00a3c7339171cdcebda0ad95116c5f81.zip
Next step along the way to getting good error messages for bad archives.
This step builds on Lang Hames work to change Archive::child_iterator for better interoperation with Error/Expected. Building on that it is now possible to return an error message when the size field of an archive contains non-decimal characters. llvm-svn: 276025
Diffstat (limited to 'llvm/tools/llvm-ar')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 865152b6af8..11dd7ea7c0f 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -343,8 +343,8 @@ static void doDisplayTable(StringRef Name, const object::Archive::Child &C) {
printMode(Mode & 007);
outs() << ' ' << C.getUID();
outs() << '/' << C.getGID();
- ErrorOr<uint64_t> Size = C.getSize();
- failIfError(Size.getError());
+ Expected<uint64_t> Size = C.getSize();
+ failIfError(Size.takeError());
outs() << ' ' << format("%6llu", Size.get());
outs() << ' ' << C.getLastModified().str();
outs() << ' ';
OpenPOWER on IntegriCloud