Skip to content

Commit 386e2ab

Browse files
committed
[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. llvm-svn: 247744
1 parent 778ac14 commit 386e2ab

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

llvm/test/tools/llvm-cxxdump/trivial.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ ELF-I386: _ZTS1A: 1A
5656
ELF-I386-NEXT: _ZTV1A[0]: 0
5757
ELF-I386-NEXT: _ZTV1A[4]: _ZTI1A
5858
ELF-I386-NEXT: _ZTV1A[8]: _ZN1A1fEv
59+
60+
RUN: not llvm-cxxdump %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
61+
ENOENT: {{.*}}.blah: {{[Nn]}}o such file or directory

llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,6 @@ static void dumpArchive(const Archive *Arc) {
499499
}
500500

501501
static void dumpInput(StringRef File) {
502-
// If file isn't stdin, check that it exists.
503-
if (File != "-" && !sys::fs::exists(File)) {
504-
reportError(File, cxxdump_error::file_not_found);
505-
return;
506-
}
507-
508502
// Attempt to open the binary.
509503
ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
510504
if (std::error_code EC = BinaryOrErr.getError()) {

0 commit comments

Comments
 (0)