llvm.org GIT mirror llvm / a4ff83a
[llvm-cxxdump] Remove duplicate code check. We already fail with 'No such file or directory' when we try to open the file -- if that doesn't exist. Also add a test to verify this behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247744 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 4 years ago
2 changed file(s) with 3 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
5555 ELF-I386-NEXT: _ZTV1A[0]: 0
5656 ELF-I386-NEXT: _ZTV1A[4]: _ZTI1A
5757 ELF-I386-NEXT: _ZTV1A[8]: _ZN1A1fEv
58
59 RUN: not llvm-cxxdump %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
60 ENOENT: {{.*}}.blah: {{[Nn]}}o such file or directory
498498 }
499499
500500 static void dumpInput(StringRef File) {
501 // If file isn't stdin, check that it exists.
502 if (File != "-" && !sys::fs::exists(File)) {
503 reportError(File, cxxdump_error::file_not_found);
504 return;
505 }
506
507501 // Attempt to open the binary.
508502 ErrorOr> BinaryOrErr = createBinary(File);
509503 if (std::error_code EC = BinaryOrErr.getError()) {