================
@@ -145,19 +145,34 @@ static CXXMethodDecl
*lookupResourceInitMethodAndSetupArgs(
// explicit binding
auto *RegSlot = llvm::ConstantInt::get(CGM.IntTy, Binding.getSlot());
Args.add(RValue::get(RegSlot), AST.UnsignedIntTy);
- CreateMethod = lookupMethod(ResourceDecl, "__createFromBinding",
SC_Static);
+ if (Binding.hasCounterImplicitOrderID())
+ CreateMethod = lookupMethod(
+ ResourceDecl, "__createFromBindingWithImplicitCounter", SC_Static);
+ else
+ CreateMethod =
+ lookupMethod(ResourceDecl, "__createFromBinding", SC_Static);
----------------
hekota wrote:
How about this?
```
const char *Name = Binding.hasCounterImplicitOrderID()
? "__createFromBindingWithImplicitCounter"
: "__createFromBinding";
CreateMethod = lookupMethod(ResourceDecl, Name, SC_Static);
```
https://github.com/llvm/llvm-project/pull/162291
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits