[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 07:47:54 PDT 2024


================
@@ -480,6 +480,9 @@ struct RegisterBindingFlags {
 
   bool ContainsNumeric = false;
   bool DefaultGlobals = false;
+
+  // used only when Resource == true
+  llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV;
----------------
damyanp wrote:

What is this was `std::optional<llvm::dxil::ResourceClass>`?  Then you wouldn't need the `Resource` flag, and you wouldn't need to initialize `ResourceClass` to some random value.

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


More information about the cfe-commits mailing list