diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-25 06:23:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-25 06:23:01 +0000 |
commit | c8002d49e376cc73c35f6a1093133e74d2a4ed78 (patch) | |
tree | 814505ec62032ba73084c9a0d524acd7f3e0b297 /llvm/lib/CodeGen/LiveInterval.cpp | |
parent | 51ebdec5c0bf26f6cdba13282433b135f9f44352 (diff) | |
download | bcm5719-llvm-c8002d49e376cc73c35f6a1093133e74d2a4ed78.tar.gz bcm5719-llvm-c8002d49e376cc73c35f6a1093133e74d2a4ed78.zip |
Make a method const, no functionality changes
llvm-svn: 15193
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index e5331530807..29bee9bd6bf 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -237,10 +237,10 @@ void LiveInterval::removeRange(unsigned Start, unsigned End) { /// getLiveRangeContaining - Return the live range that contains the /// specified index, or null if there is none. -LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) { - Ranges::iterator It = std::upper_bound(ranges.begin(), ranges.end(), Idx); +const LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) const { + Ranges::const_iterator It = std::upper_bound(ranges.begin(),ranges.end(),Idx); if (It != ranges.begin()) { - LiveRange &LR = *prior(It); + const LiveRange &LR = *prior(It); if (LR.contains(Idx)) return &LR; } @@ -254,8 +254,8 @@ LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) { /// is the result of a copy instruction in the source program, that occurs at /// index 'CopyIdx' that copies from 'Other' to 'this'. void LiveInterval::join(LiveInterval &Other, unsigned CopyIdx) { - LiveRange *SourceLR = Other.getLiveRangeContaining(CopyIdx-1); - LiveRange *DestLR = getLiveRangeContaining(CopyIdx); + const LiveRange *SourceLR = Other.getLiveRangeContaining(CopyIdx-1); + const LiveRange *DestLR = getLiveRangeContaining(CopyIdx); assert(SourceLR && DestLR && "Not joining due to a copy?"); unsigned MergedSrcValIdx = SourceLR->ValId; unsigned MergedDstValIdx = DestLR->ValId; |