Fix a likely bug in an assertion by adding parentheses around '||'. This bug
authorChandler Carruth <chandlerc@gmail.com>
Sat, 23 Oct 2010 07:46:14 +0000 (07:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 23 Oct 2010 07:46:14 +0000 (07:46 +0000)
was found by a GCC warning. ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117199 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalUnion.cpp

index b22f466367edbfa4cb54c4fd6f093ea2fa5acf8d..dea228300ec73aecd0a00b13f1135a936a73ad8b 100644 (file)
@@ -25,7 +25,7 @@ void LiveIntervalUnion::unify(LiveInterval &lvr) {
   // 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();