diff options
author | Zachary Turner <zturner@google.com> | 2017-08-15 21:46:51 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-08-15 21:46:51 +0000 |
commit | 1bc6cb64b1f668911180f2d5dc8f1bc05e953710 (patch) | |
tree | 8b8b65ef3daa61732d6de3cffe8670b3ae2a7c45 | |
parent | de0fe07eef6419bfa253b47e594f070c31cdbff2 (diff) | |
download | bcm5719-llvm-1bc6cb64b1f668911180f2d5dc8f1bc05e953710.tar.gz bcm5719-llvm-1bc6cb64b1f668911180f2d5dc8f1bc05e953710.zip |
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
-rw-r--r-- | lld/COFF/Writer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index 6a19882c1e3..eec4d37ec43 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -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) |