@@ -199,7 +199,7 @@ namespace llvm {
199
199
// of live ranges of physical registers in computeRegUnitRange.
200
200
// After that the set is flushed to the segment vector and deleted.
201
201
typedef std::set<Segment> SegmentSet;
202
- std::unique_ptr< SegmentSet> segmentSet;
202
+ SegmentSet * segmentSet;
203
203
204
204
typedef Segments::iterator iterator;
205
205
iterator begin () { return segments.begin (); }
@@ -218,13 +218,15 @@ namespace llvm {
218
218
const_vni_iterator vni_end () const { return valnos.end (); }
219
219
220
220
// / Constructs a new LiveRange object.
221
- LiveRange (bool UseSegmentSet = false )
222
- : segmentSet(UseSegmentSet ? llvm::make_unique<SegmentSet>()
223
- : nullptr ) {}
221
+ LiveRange (bool UseSegmentSet = false ) : segmentSet(nullptr ) {
222
+ if (UseSegmentSet)
223
+ segmentSet = new SegmentSet ();
224
+ }
224
225
225
226
// / Constructs a new LiveRange object by copying segments and valnos from
226
227
// / another LiveRange.
227
- LiveRange (const LiveRange &Other, BumpPtrAllocator &Allocator) {
228
+ LiveRange (const LiveRange &Other, BumpPtrAllocator &Allocator)
229
+ : segmentSet(nullptr ) {
228
230
assert (Other.segmentSet == nullptr &&
229
231
" Copying of LiveRanges with active SegmentSets is not supported" );
230
232
@@ -238,6 +240,8 @@ namespace llvm {
238
240
}
239
241
}
240
242
243
+ ~LiveRange () { delete segmentSet; }
244
+
241
245
// / advanceTo - Advance the specified iterator to point to the Segment
242
246
// / containing the specified position, or end() if the position is past the
243
247
// / end of the range. If no Segment contains this position, but the
@@ -741,6 +745,8 @@ namespace llvm {
741
745
#endif
742
746
743
747
private:
748
+ LiveInterval& operator =(const LiveInterval& rhs) = delete ;
749
+
744
750
// / Appends @p Range to SubRanges list.
745
751
void appendSubRange (SubRange *Range) {
746
752
Range->Next = SubRanges;
0 commit comments