================
@@ -33,9 +33,18 @@
 #include <optional>
 #include <vector>
 
-// A function generator macro for picking the right intrinsic
-// for the target backend
-#define GENERATE_HLSL_INTRINSIC_FUNCTION(FunctionName, IntrinsicPostfix)       
\
+// Function generator macros for picking the right intrinsic
+// for the target backend.
+#define HLSL_INTRINSIC_FUNCTION_CHOOSER(_1, _2, _3, NAME, ...) NAME
+
+#define GENERATE_HLSL_INTRINSIC_FUNCTION(...)                                  
\
+  HLSL_INTRINSIC_FUNCTION_CHOOSER(                                             
\
+      __VA_ARGS__, GENERATE_HLSL_INTRINSIC_FUNCTION3,                          
\
+      GENERATE_HLSL_INTRINSIC_FUNCTION2,                                       
\
+      /* dummy to solve pre-C++20 errors */ ignored)(__VA_ARGS__)
----------------
farzonl wrote:

The feeback I was given on a similar change I wanted to make was that the 
preprocessor is the wrong tool to do this 
https://github.com/llvm/llvm-project/pull/117648/changes

https://github.com/llvm/llvm-project/pull/227160
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to