If 'other' was empty 'overlapsFrom(other, other.begin());' will segfault. This avoids that.

llvm-svn: 109075
This commit is contained in:
Lang Hames 2010-07-22 02:05:10 +00:00
parent 6d48476446
commit 1cb63afb44
1 changed files with 2 additions and 0 deletions

View File

@ -465,6 +465,8 @@ namespace llvm {
/// 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());
}