[llvm] r347939 - Fix build warnings introduced in rL347938
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 29 17:53:17 PST 2018
Author: mtrofin
Date: Thu Nov 29 17:53:17 2018
New Revision: 347939
URL: http://llvm.org/viewvc/llvm-project?rev=347939&view=rev
Log:
Fix build warnings introduced in rL347938
Summary:
Suppressed warnings in release builds due to variable used
only in assert statement.
Subscribers: llvm-commits, eraman, mgorny
Differential Revision: https://reviews.llvm.org/D55100
Modified:
llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp
Modified: llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp?rev=347939&r1=347938&r2=347939&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp Thu Nov 29 17:53:17 2018
@@ -114,7 +114,9 @@ bool X86DiscriminateMemOps::runOnMachine
Changed = true;
const std::pair<DenseSet<unsigned>::iterator, bool> MustInsert =
Set.insert(DI->getBaseDiscriminator());
- assert(MustInsert.second);
+ (void)MustInsert; // silence warning.
+ assert(MustInsert.second &&
+ "New discriminator shouldn't be present in set");
}
// Bump the reference DI to avoid cramming discriminators on line 0.
More information about the llvm-commits
mailing list