[clang] [llvm] [HLSL][SPIR-V] Add support for SV_Target semantic (PR #168743)

Steven Perron via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 21 08:38:18 PST 2025


Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/168743 at github.com>


================
@@ -244,6 +241,17 @@ class SemaHLSL : public SemaBase {
     std::optional<uint32_t> Index;
   };
 
+  enum IOType {
+    In = 0b01,
+    Out = 0b10,
+    InOut = 0b11,
+  };
+
+  struct SemanticStageInfo {
+    llvm::Triple::EnvironmentType Stage;
+    IOType Direction;
----------------
s-perron wrote:

The name `Direction` (singular) is a little misleading. A better name might be `AllowedIOTypes`. You want something to indicate that this is a bitset. This links it to the specific enum better. I think that would read better when it is access later on.



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


More information about the cfe-commits mailing list