[clang] Adding `asuint` implementation to hlsl (PR #107292)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 11:40:45 PDT 2024
================
@@ -0,0 +1,35 @@
+//===----- hlsl_intrinsics.h - HLSL definitions for intrinsics ----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _HLSL_HLSL_DETAILS_H_
+#define _HLSL_HLSL_DETAILS_H_
+
+namespace __details {
+#define HLSL_INLINE_ATTRIBUTE \
+ __attribute__((__always_inline__, __nodebug__)) static inline
----------------
bogner wrote:
This should start with an underscore to avoid collisions with user's defines (`_CapitalLetter` is reserved for implementations). Since it isn't just an attribute (it's also `static inline` I'd just call it `_HLSL_INLINE`.
https://github.com/llvm/llvm-project/pull/107292
More information about the cfe-commits
mailing list