aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2007-09-06 19:46:46 +0000
committerDavid Greene <greened@obbligato.org>2007-09-06 19:46:46 +0000
commite97f07714219e0407f908428c157ba7ec0cbf2dd (patch)
tree9143b6b9bff14c6380085f142b9e3fdf72b5507f
parentb9de9f07d611823ea3371b65f87035f482ace2ad (diff)
downloadexternal_llvm-e97f07714219e0407f908428c157ba7ec0cbf2dd.zip
external_llvm-e97f07714219e0407f908428c157ba7ec0cbf2dd.tar.gz
external_llvm-e97f07714219e0407f908428c157ba7ec0cbf2dd.tar.bz2
Constify to catch bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/LiveInterval.h5
-rw-r--r--lib/CodeGen/LiveInterval.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 8b32a5a..50ac158 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -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.
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 9b4872d..f205d0c 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -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.