[clang] [HLSL] Collect explicit resource binding information (PR #111203)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 16 21:39:00 PDT 2024
================
@@ -110,6 +110,19 @@ DeclBindingInfo *ResourceBindings::addDeclBindingInfo(const VarDecl *VD,
ResourceClass ResClass) {
assert(getDeclBindingInfo(VD, ResClass) == nullptr &&
"DeclBindingInfo already added");
+#ifndef NDEBUG
+ // Verify that existing bindings for this decl are stored sequentially
+ // and at the end of the BindingsList
+ auto I = DeclToBindingListIndex.find(VD);
+ if (I != DeclToBindingListIndex.end()) {
+ for (unsigned Index = I->getSecond(); Index < BindingsList.size(); ++Index)
+ assert(BindingsList[Index].Decl == VD);
+ }
+#endif
----------------
hekota wrote:
Shoot! I have completed this PR before realizing I did not push this change up.
Here is a separate PR: https://github.com/llvm/llvm-project/pull/112661
https://github.com/llvm/llvm-project/pull/111203
More information about the cfe-commits
mailing list