Skip to content

Commit 803e03f

Browse files
committed
[llvm] Revive constructor of 'ResourceSegments'
582c6a8 removed a constructor of 'ResourceSegments' that is needed in LLVM unit tests. * Revert 582c6a8 * Update the constructor to take a const reference of `std::list` as pointed out in llvm#89193.
1 parent ccb198d commit 803e03f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/include/llvm/CodeGen/MachineScheduler.h

+4
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,10 @@ class ResourceSegments {
807807
// constructor for empty set
808808
explicit ResourceSegments(){};
809809
bool empty() const { return _Intervals.empty(); }
810+
explicit ResourceSegments(const std::list<IntervalTy> &Intervals)
811+
: _Intervals(Intervals) {
812+
sortAndMerge();
813+
}
810814

811815
friend bool operator==(const ResourceSegments &c1,
812816
const ResourceSegments &c2) {

0 commit comments

Comments
 (0)