[PATCH] D55100: Fix build warnings introduced in rL347938

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 29 17:56:21 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL347939: Fix build warnings introduced in rL347938 (authored by mtrofin, committed by ).

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55100/new/

https://reviews.llvm.org/D55100

Files:
  llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp


Index: llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp
+++ llvm/trunk/lib/Target/X86/X86DiscriminateMemOps.cpp
@@ -114,7 +114,9 @@
         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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55100.176008.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181130/d261c573/attachment.bin>


More information about the llvm-commits mailing list