Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
authorChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 01:34:44 +0000 (01:34 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 01:34:44 +0000 (01:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17931 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveInterval.h
lib/CodeGen/LiveInterval.h

index 87cb570306cb89f0e70f76f5222a86d0de108908..2784ba7f2b19cdbe579706ebdede0ca5f3b45a5c 100644 (file)
@@ -110,7 +110,7 @@ namespace llvm {
     }
 
     bool expiredAt(unsigned index) const {
-      return endNumber() <= (index + 1);
+      return index >= endNumber();
     }
 
     bool liveAt(unsigned index) const;
index 87cb570306cb89f0e70f76f5222a86d0de108908..2784ba7f2b19cdbe579706ebdede0ca5f3b45a5c 100644 (file)
@@ -110,7 +110,7 @@ namespace llvm {
     }
 
     bool expiredAt(unsigned index) const {
-      return endNumber() <= (index + 1);
+      return index >= endNumber();
     }
 
     bool liveAt(unsigned index) const;