diff --git a/test/tools/llvm-cxxdump/Inputs/mixed-archive.coff-i386 b/test/tools/llvm-cxxdump/Inputs/mixed-archive.coff-i386 new file mode 100644 index 000000000000..d8a77ef10ab6 Binary files /dev/null and b/test/tools/llvm-cxxdump/Inputs/mixed-archive.coff-i386 differ diff --git a/test/tools/llvm-cxxdump/trivial.test b/test/tools/llvm-cxxdump/trivial.test index 2c36620bff2f..d4982b87d8d2 100644 --- a/test/tools/llvm-cxxdump/trivial.test +++ b/test/tools/llvm-cxxdump/trivial.test @@ -4,6 +4,9 @@ RUN: | FileCheck %s --check-prefix=COFF-I386 RUN: llvm-cxxdump %p/Inputs/trivial.obj.elf-i386 \ RUN: | FileCheck %s --check-prefix=ELF-I386 +RUN: llvm-cxxdump %p/Inputs/mixed-archive.coff-i386 \ +RUN: | FileCheck %s --check-prefix=MIXEDARCOFF-I386 + COFF-I386: ??_7S@@6B@[0]: ??_R4S@@6B@ COFF-I386-NEXT: ??_7S@@6B@[4]: ??_GS@@UAEPAXI@Z COFF-I386-NEXT: ??_8S@@7B@[0]: -4 @@ -57,5 +60,7 @@ ELF-I386-NEXT: _ZTV1A[0]: 0 ELF-I386-NEXT: _ZTV1A[4]: _ZTI1A ELF-I386-NEXT: _ZTV1A[8]: _ZN1A1fEv +MIXEDARCOFF-I386: ??_7S@@6B@[0]: ??_R4S@@6B@ + RUN: not llvm-cxxdump %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s ENOENT: {{.*}}.blah: {{[Nn]}}o such file or directory diff --git a/tools/llvm-cxxdump/llvm-cxxdump.cpp b/tools/llvm-cxxdump/llvm-cxxdump.cpp index c92d20d6ccf1..518d414c7b92 100644 --- a/tools/llvm-cxxdump/llvm-cxxdump.cpp +++ b/tools/llvm-cxxdump/llvm-cxxdump.cpp @@ -502,7 +502,7 @@ static void dumpArchive(const Archive *Arc) { OS.flush(); reportError(Arc->getFileName(), Buf); } - ChildOrErr.takeError(); + consumeError(ChildOrErr.takeError()); continue; }