[llvm-commits] [llvm] r109075 - /llvm/trunk/include/llvm/CodeGen/LiveInterval.h
Lang Hames
lhames at gmail.com
Wed Jul 21 19:05:11 PDT 2010
Author: lhames
Date: Wed Jul 21 21:05:10 2010
New Revision: 109075
URL: http://llvm.org/viewvc/llvm-project?rev=109075&view=rev
Log:
If 'other' was empty 'overlapsFrom(other, other.begin());' will segfault. This avoids that.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveInterval.h
Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=109075&r1=109074&r2=109075&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Wed Jul 21 21:05:10 2010
@@ -465,6 +465,8 @@
/// overlaps - Return true if the intersection of the two live intervals is
/// not empty.
bool overlaps(const LiveInterval& other) const {
+ if (other.empty())
+ return false;
return overlapsFrom(other, other.begin());
}
More information about the llvm-commits
mailing list