[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 19:20:03 PDT 2024


================
@@ -2241,6 +2247,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
     Align = ALIGN;                                                             \
     break;
 #include "clang/Basic/AMDGPUTypes.def"
+#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
+#include "clang/Basic/HLSLIntangibleTypes.def"
+      Width = 0;
----------------
hekota wrote:

The intangible type is currently implemented as size-less type, but that might change as the HLSL implementation evolves. Setting the width to 0 here matches what similar types from other languages have done, for example `__externref_t` in WebAssembly, which is also an opaque type whose value cannot be accessed or manipulated, only passed around.

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


More information about the cfe-commits mailing list