diff options
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.h')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.h b/llvm/lib/CodeGen/LiveInterval.h index 75acf52c4ac..dde7a86712c 100644 --- a/llvm/lib/CodeGen/LiveInterval.h +++ b/llvm/lib/CodeGen/LiveInterval.h @@ -76,6 +76,21 @@ namespace llvm { : reg(Reg), weight(Weight), NumValues(0) { } + LiveInterval& operator=(const LiveInterval& rhs) { + reg = rhs.reg; + weight = rhs.weight; + ranges = rhs.ranges; + NumValues = rhs.NumValues; + return *this; + } + + void swap(LiveInterval& other) { + std::swap(reg, other.reg); + std::swap(weight, other.weight); + ranges.swap(other.ranges); + std::swap(NumValues, other.NumValues); + } + bool containsOneValue() const { return NumValues == 1; } unsigned getNextValue() { |