[lld] r310965 - Fix warning about unused variable.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 14:46:51 PDT 2017
Author: zturner
Date: Tue Aug 15 14:46:51 2017
New Revision: 310965
URL: http://llvm.org/viewvc/llvm-project?rev=310965&view=rev
Log:
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.
Modified:
lld/trunk/COFF/Writer.cpp
Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=310965&r1=310964&r2=310965&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Tue Aug 15 14:46:51 2017
@@ -268,8 +268,10 @@ static Optional<codeview::DebugInfo> loa
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)
More information about the llvm-commits
mailing list