mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
unique_ptrify LiveRange::segmentSet
This makes LiveRange non-copyable, and LiveInterval is already non-movable (due to the explicit dtor), so now it's non-copyable and non-movable. Fix the one case where we were relying on the (deprecated in C++11) implicit copy ctor of LiveInterval (which happened to work because the ctor created an object with a null segmentSet, so double-deleting the null pointer was fine). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -61,8 +61,10 @@ LiveStacks::getOrCreateInterval(int Slot, const TargetRegisterClass *RC) {
|
||||
assert(Slot >= 0 && "Spill slot indice must be >= 0");
|
||||
SS2IntervalMap::iterator I = S2IMap.find(Slot);
|
||||
if (I == S2IMap.end()) {
|
||||
I = S2IMap.insert(I, std::make_pair(Slot,
|
||||
LiveInterval(TargetRegisterInfo::index2StackSlot(Slot), 0.0F)));
|
||||
I = S2IMap.emplace(std::piecewise_construct, std::forward_as_tuple(Slot),
|
||||
std::forward_as_tuple(
|
||||
TargetRegisterInfo::index2StackSlot(Slot), 0.0F))
|
||||
.first;
|
||||
S2RCMap.insert(std::make_pair(Slot, RC));
|
||||
} else {
|
||||
// Use the largest common subclass register class.
|
||||
|
Reference in New Issue
Block a user