Index: COFF/InputFiles.cpp =================================================================== --- COFF/InputFiles.cpp +++ COFF/InputFiles.cpp @@ -64,7 +64,7 @@ void ArchiveFile::parse() { // Parse a MemoryBufferRef as an archive file. - File = check(Archive::create(MB), "failed to parse static library"); + File = check(Archive::create(MB), getShortName()); // Allocate a buffer for Lazy objects. size_t NumSyms = File->getNumberOfSymbols(); @@ -81,7 +81,7 @@ for (auto &Child : File->children(Err)) Seen[Child.getChildOffset()].clear(); if (Err) - fatal(Err, "failed to parse static library"); + fatal(Err, getShortName()); } // Returns a buffer pointing to a member file containing a given symbol. @@ -109,13 +109,13 @@ void ObjectFile::parse() { // Parse a memory buffer as a COFF file. std::unique_ptr Bin = - check(createBinary(MB), "failed to parse object file"); + check(createBinary(MB), getShortName()); if (auto *Obj = dyn_cast(Bin.get())) { Bin.release(); COFFObj.reset(Obj); } else { - fatal(getName() + " is not a COFF file"); + fatal(getShortName() + " is not a COFF file"); } // Read section and symbol tables. @@ -169,7 +169,7 @@ for (uint32_t I = 0; I < NumSymbols; ++I) { // Get a COFFSymbolRef object. COFFSymbolRef Sym = - check(COFFObj->getSymbol(I), "broken object file: " + getName()); + check(COFFObj->getSymbol(I), "broken object file: " + getShortName()); const void *AuxP = nullptr; if (Sym.getNumberOfAuxSymbols()) @@ -231,12 +231,12 @@ // Reserved sections numbers don't have contents. if (llvm::COFF::isReservedSectionNumber(SectionNumber)) - fatal("broken object file: " + getName()); + fatal("broken object file: " + getShortName()); // This symbol references a section which is not present in the section // header. if ((uint32_t)SectionNumber >= SparseChunks.size()) - fatal("broken object file: " + getName()); + fatal("broken object file: " + getShortName()); // Nothing else to do without a section chunk. auto *SC = cast_or_null(SparseChunks[SectionNumber]);