summaryrefslogtreecommitdiff
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-08-03 21:57:47 +0000
committerKevin Enderby <enderby@apple.com>2016-08-03 21:57:47 +0000
commitb48816b9fc8f4414984cd6ec30fe48a468b4502a (patch)
tree91a966a6a7a1431795487faadb31eceec25aaac4 /tools/llvm-nm
parentdfe91b47a82dab66327c8f85f003a8bb54916c8c (diff)
Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<>
changing them to Expected<> to allow them to pass through llvm Errors. No functional change. This commit by itself will break the next lld builds.  I’ll be committing the matching change for lld immediately next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index 424303b1695..af3d7db1dda 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -1097,9 +1097,9 @@ static void dumpSymbolNamesFromFile(std::string &Filename) {
if (I != E) {
outs() << "Archive map\n";
for (; I != E; ++I) {
- ErrorOr<Archive::Child> C = I->getMember();
- if (error(C.getError()))
- return;
+ Expected<Archive::Child> C = I->getMember();
+ if (!C)
+ error(C.takeError(), Filename);
Expected<StringRef> FileNameOrErr = C->getName();
if (!FileNameOrErr) {
error(FileNameOrErr.takeError(), Filename);