[clang] [NFC] Cleanup and sort hlsl_intrinsics.h (PR #72414)

David Peixotto via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 15 09:16:58 PST 2023


================
@@ -11,557 +11,614 @@
 
 namespace hlsl {
 
-__attribute__((availability(shadermodel, introduced = 6.0)))
-__attribute__((clang_builtin_alias(__builtin_hlsl_wave_active_count_bits))) uint
-WaveActiveCountBits(bool bBit);
+// Note: Functions in this file are sorted alphabetically, then grouped by base
+// element type, and the element types are sorted by size, then singed integer,
+// unsigned integer and floating point. Keeping this ordering consistent will
+// help keep this file manageable as it grows.
 
+#define _HLSL_BUILTIN_ALIAS(builtin)                                           \
----------------
dmpots wrote:

Is it ok to have macros that start with an underscore? I thought identifiers starting with _ are reserved in c/c++, but not sure about macros.

Also, since this is a header file should we undef them at the end? Not sure we expect others to use the macros themselves, but more of just an implementation detail of the header.

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


More information about the cfe-commits mailing list