Constify to catch bugs.
authorDavid Greene <greened@obbligato.org>
Thu, 6 Sep 2007 19:46:46 +0000 (19:46 +0000)
committerDavid Greene <greened@obbligato.org>
Thu, 6 Sep 2007 19:46:46 +0000 (19:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 8b32a5a0c6284f6da25fb81a9c78d1d859439b9c..50ac158590377f1665f99abaa5c57743f1176f01 100644 (file)
@@ -310,8 +310,9 @@ namespace llvm {
     /// join - Join two live intervals (this, and other) together.  This applies
     /// mappings to the value numbers in the LHS/RHS intervals as specified.  If
     /// the intervals are not joinable, this aborts.
-    void join(LiveInterval &Other, int *ValNoAssignments,
-              int *RHSValNoAssignments, SmallVector<VNInfo*, 16> &NewVNInfo);
+    void join(LiveInterval &Other, const int *ValNoAssignments,
+              const int *RHSValNoAssignments,
+             SmallVector<VNInfo*, 16> &NewVNInfo);
 
     /// removeRange - Remove the specified range from this interval.  Note that
     /// the range must already be in this interval in its entirety.
index 9b4872d830847939cda0c9cc6c8c79bde05fddfe..f205d0c5e283fd4e3c3cb7a7238e7e4d35b3e615 100644 (file)
@@ -285,8 +285,8 @@ LiveInterval::FindLiveRangeContaining(unsigned Idx) {
 /// join - Join two live intervals (this, and other) together.  This applies
 /// mappings to the value numbers in the LHS/RHS intervals as specified.  If
 /// the intervals are not joinable, this aborts.
-void LiveInterval::join(LiveInterval &Other, int *LHSValNoAssignments,
-                        int *RHSValNoAssignments, 
+void LiveInterval::join(LiveInterval &Other, const int *LHSValNoAssignments,
+                        const int *RHSValNoAssignments, 
                         SmallVector<VNInfo*, 16> &NewVNInfo) {
   // Determine if any of our live range values are mapped.  This is uncommon, so
   // we want to avoid the interval scan if not.