diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 33f0b9e986ef..8ba995bf4423 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -496,7 +496,7 @@ bool LinkerDriver::link(llvm::ArrayRef ArgsArr) { if (Config->Verbose) llvm::outs() << "Reading " << File->getName() << "\n"; if (auto EC = Symtab.addFile(std::move(File))) { - llvm::errs() << File->getName() << ": " << EC.message() << "\n"; + llvm::errs() << MB.getBufferIdentifier() << ": " << EC.message() << "\n"; return false; } }