diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index 6a19882c1e37..eec4d37ec43c 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -268,8 +268,10 @@ static Optional loadExistingBuildId(StringRef Path) { const codeview::DebugInfo *ExistingDI = nullptr; StringRef PDBFileName; - if (auto EC = File.getDebugPDBInfo(ExistingDI, PDBFileName)) + if (auto EC = File.getDebugPDBInfo(ExistingDI, PDBFileName)) { + (void)EC; return None; + } // We only support writing PDBs in v70 format. So if this is not a build // id that we recognize / support, ignore it. if (ExistingDI->Signature.CVSignature != OMF::Signature::PDB70)