RUN: not llvm-objdump -macho -disassemble -g -dsym=%s %p/Inputs/bind.macho-x86_64 2>&1 | FileCheck %s -check-prefix=UNKNOWN_FILE_TYPE_DSYM
UNKNOWN_FILE_TYPE_DSYM: {{.*}}llvm-objdump: error:
+
+RUN: not llvm-objdump -macho -disassemble -g -dsym=%p/missing-dsym %p/Inputs/bind.macho-x86_64 2>&1 | FileCheck %s -check-prefix=NO_SUCH_FILE_DSYM
+NO_SUCH_FILE_DSYM: error: {{.*}}missing-dsym:
+
+RUN: not llvm-objdump -macho -disassemble -g -dsym=%s %p/Inputs/bind.macho-x86_64 2>&1 | FileCheck %s -check-prefix=UNKNOWN_FILE_TYPE_DSYM_MSG
+UNKNOWN_FILE_TYPE_DSYM_MSG: {{.*}}llvm-objdump: error:
+UNKNOWN_FILE_TYPE_DSYM_MSG-NOT: bind.macho-x86_64
MemoryBuffer::getFileOrSTDIN(DSYMFile);
if (std::error_code EC = BufOrErr.getError()) {
WithColor::error(errs(), "llvm-objdump")
- << Filename << ": " << EC.message() << '\n';
+ << DSYMFile << ": " << EC.message() << '\n';
return;
}
Expected<std::unique_ptr<MachOObjectFile>> DbgObjCheck =
ObjectFile::createMachOObjectFile(BufOrErr.get()->getMemBufferRef());
if (Error E = DbgObjCheck.takeError())
- report_error(MachOOF->getFileName(), std::move(E));
+ report_error(DSYMFile, std::move(E));
DbgObj = DbgObjCheck.get().release();
// We need to keep the file alive, because we're replacing DbgObj with it.