Skip to content

Commit 5c25e86

Browse files
committed
review: add comment to better describe Maps loop
1 parent d8c6879 commit 5c25e86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,14 @@ class ResourceRanges {
992992
if (Res.has_value())
993993
return Res;
994994

995+
// If the range that we are inserting has ShaderVisiblity::All it needs to
996+
// check for an overlap in all other visibility types as well.
997+
// Otherwise, the range that is inserted needs to check that it does not
998+
// overlap with ShaderVisibility::All.
999+
//
1000+
// Maps will be an ArrayRef to all non-all visibility RangeMaps in the
1001+
// former case and it will be an ArrayRef to just the all visiblity
1002+
// RangeMap in the latter case.
9951003
MutableArrayRef<MapT> Maps =
9961004
Info.Vis == llvm::hlsl::rootsig::ShaderVisibility::All
9971005
? MutableArrayRef<MapT>{RangeMaps}.drop_front()

0 commit comments

Comments
 (0)