mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
If 'other' was empty 'overlapsFrom(other, other.begin());' will segfault. This avoids that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2d4590d6fb
commit
624e0b2be6
@ -465,6 +465,8 @@ namespace llvm {
|
|||||||
/// overlaps - Return true if the intersection of the two live intervals is
|
/// overlaps - Return true if the intersection of the two live intervals is
|
||||||
/// not empty.
|
/// not empty.
|
||||||
bool overlaps(const LiveInterval& other) const {
|
bool overlaps(const LiveInterval& other) const {
|
||||||
|
if (other.empty())
|
||||||
|
return false;
|
||||||
return overlapsFrom(other, other.begin());
|
return overlapsFrom(other, other.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user