diff options
Diffstat (limited to 'tools/llvm-cxxdump/llvm-cxxdump.cpp')
-rw-r--r-- | tools/llvm-cxxdump/llvm-cxxdump.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-cxxdump/llvm-cxxdump.cpp b/tools/llvm-cxxdump/llvm-cxxdump.cpp index 3dda69266a2..5048987865f 100644 --- a/tools/llvm-cxxdump/llvm-cxxdump.cpp +++ b/tools/llvm-cxxdump/llvm-cxxdump.cpp @@ -502,8 +502,9 @@ static void dumpArchive(const Archive *Arc) { static void dumpInput(StringRef File) { // Attempt to open the binary. - ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(File); - if (std::error_code EC = BinaryOrErr.getError()) { + Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File); + if (!BinaryOrErr) { + auto EC = errorToErrorCode(BinaryOrErr.takeError()); reportError(File, EC); return; } |