Skip to content

Commit d498922

Browse files
committed
review: add assert
1 parent 9a2a82d commit d498922

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ llvm::SmallVector<OverlappingRanges>
247247
findOverlappingRanges(ArrayRef<RangeInfo> Infos) {
248248
// It is expected that Infos is filled with valid RangeInfos and that
249249
// they are sorted with respect to the RangeInfo <operator
250+
assert(llvm::is_sorted(Infos) && "Ranges must be sorted");
251+
250252
llvm::SmallVector<OverlappingRanges> Overlaps;
251253
using GroupT = std::pair<dxil::ResourceClass, /*Space*/ uint32_t>;
252254

0 commit comments

Comments
 (0)