[llvm-commits] [llvm] r117199 - /llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp

Chandler Carruth chandlerc at gmail.com
Sat Oct 23 00:46:14 PDT 2010


Author: chandlerc
Date: Sat Oct 23 02:46:14 2010
New Revision: 117199

URL: http://llvm.org/viewvc/llvm-project?rev=117199&view=rev
Log:
Fix a likely bug in an assertion by adding parentheses around '||'. This bug
was found by a GCC warning. ;]

Modified:
    llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp

Modified: llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp?rev=117199&r1=117198&r2=117199&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp Sat Oct 23 02:46:14 2010
@@ -25,7 +25,7 @@
   // Add this live virtual register to the union
   LiveVirtRegs::iterator pos = std::upper_bound(lvrs_.begin(), lvrs_.end(),
                                                 &lvr, less_ptr<LiveInterval>());
-  assert(pos == lvrs_.end() || *pos != &lvr && "duplicate LVR insertion");
+  assert((pos == lvrs_.end() || *pos != &lvr) && "duplicate LVR insertion");
   lvrs_.insert(pos, &lvr);
   // Insert each of the virtual register's live segments into the map
   SegmentIter segPos = segments_.begin();





More information about the llvm-commits mailing list