From: David Greene Date: Thu, 6 Sep 2007 19:46:46 +0000 (+0000) Subject: Constify to catch bugs. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=af992f782fb2cac8d00b352c3dd73f6e782b5758;p=oota-llvm.git Constify to catch bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 8b32a5a0c62..50ac1585903 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 &NewVNInfo); + void join(LiveInterval &Other, const int *ValNoAssignments, + const int *RHSValNoAssignments, + SmallVector &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 9b4872d8308..f205d0c5e28 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 &NewVNInfo) { // Determine if any of our live range values are mapped. This is uncommon, so // we want to avoid the interval scan if not.