Fix warning about unused variable.

I'm explicitly ignoring the warning by casting to void instead of
deleting the local assignment, because it's confusing to see a
function that fails when its return value evaluates to true.
But when you see that it's a std::error_code, it makes more sense.

llvm-svn: 310965
This commit is contained in:
Zachary Turner 2017-08-15 21:46:51 +00:00
parent de0fe07eef
commit 1bc6cb64b1
1 changed files with 3 additions and 1 deletions

View File

@ -268,8 +268,10 @@ static Optional<codeview::DebugInfo> 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)