[llvm-branch-commits] [clang] [HLSL] Add binding attributes to resources from structs (PR #184731)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 19 14:03:45 PDT 2026


================
@@ -163,6 +181,15 @@ static Builtin::ID getSpecConstBuiltinId(const Type *Type) {
   }
 }
 
+static StringRef createRegisterString(ASTContext &AST, RegisterType RegType,
+                                      unsigned N) {
+  llvm::SmallString<16> Buffer;
+  llvm::raw_svector_ostream OS(Buffer);
+  OS << getRegisterTypeChar(RegType);
+  OS << N;
+  return AST.backupStr(OS.str());
----------------
bogner wrote:

`AST.backupStr` allocates a new string using the AST's allocator. I don't see anything wrong here...

https://github.com/llvm/llvm-project/pull/184731


More information about the llvm-branch-commits mailing list