[clang] counter var3 (PR #162291)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 7 16:13:42 PDT 2025
================
@@ -3815,19 +3860,35 @@ bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) {
CXXMethodDecl *CreateMethod = nullptr;
llvm::SmallVector<Expr *> Args;
+ bool HasCounter = hasCounterHandle(ResourceDecl);
+ std::string CreateMethodName;
+ if (Binding.isExplicit())
+ CreateMethodName = HasCounter ? "__createFromBindingWithImplicitCounter"
+ : "__createFromBinding";
+ else
+ CreateMethodName = HasCounter
+ ? "__createFromImplicitBindingWithImplicitCounter"
+ : "__createFromImplicitBinding";
+
+ CreateMethod =
+ lookupMethod(SemaRef, ResourceDecl, CreateMethodName, VD->getLocation());
+ if (!CreateMethod) {
+ llvm::dbgs() << "STEVEN: failed to get method " << CreateMethodName << "\n";
+ VD->dumpColor();
+ }
----------------
hekota wrote:
Don't forget to remove before merging :)
https://github.com/llvm/llvm-project/pull/162291
More information about the cfe-commits
mailing list