Skip to content

Commit fd38cf9

Browse files
committed
Add HLSLIntangibleTypes.def and first HLSL intangible type HLSLResource.
Modify all places where HLSLResource needs to be added to use the def file. Future intangible types will be added just to HLSLIntangibleTypes.def and everything else should just work. Add getHLSLType virtual method to TargetCodeGenInfo to be overridden in future DirectXTargetCodeGenInfo class (llvm#95952).
1 parent 3db38e6 commit fd38cf9

28 files changed

+148
-56
lines changed

clang/include/clang-c/Index.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,9 @@ enum CXTypeKind {
29682968
CXType_Atomic = 177,
29692969
CXType_BTFTagAttributed = 178,
29702970

2971-
CXType_HLSLResource = 179
2971+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
2972+
CXType_##Id,
2973+
#include "clang/Basic/HLSLIntangibleTypes.def"
29722974
};
29732975

29742976
/**

clang/include/clang/AST/ASTContext.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
11301130
#include "clang/Basic/OpenCLImageTypes.def"
11311131
CanQualType OCLSamplerTy, OCLEventTy, OCLClkEventTy;
11321132
CanQualType OCLQueueTy, OCLReserveIDTy;
1133-
CanQualType HLSLResourceTy;
11341133
CanQualType IncompleteMatrixIdxTy;
11351134
CanQualType ArraySectionTy;
11361135
CanQualType OMPArrayShapingTy, OMPIteratorTy;
@@ -1150,6 +1149,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
11501149
#include "clang/Basic/WebAssemblyReferenceTypes.def"
11511150
#define AMDGPU_TYPE(Name, Id, SingletonId) CanQualType SingletonId;
11521151
#include "clang/Basic/AMDGPUTypes.def"
1152+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) CanQualType SingletonId;
1153+
#include "clang/Basic/HLSLIntangibleTypes.def"
11531154

11541155
// Types for deductions in C++0x [stmt.ranged]'s desugaring. Built on demand.
11551156
mutable QualType AutoDeductTy; // Deduction against 'auto'.

clang/include/clang/AST/BuiltinTypes.def

-2
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ BUILTIN_TYPE(OCLQueue, OCLQueueTy)
257257
// OpenCL reserve_id_t.
258258
BUILTIN_TYPE(OCLReserveID, OCLReserveIDTy)
259259

260-
// HLSL resource type
261-
BUILTIN_TYPE(HLSLResource, HLSLResourceTy)
262260

263261
// This represents the type of an expression whose type is
264262
// totally unknown, e.g. 'T::foo'. It is permitted for this to

clang/include/clang/AST/Type.h

+14-6
Original file line numberDiff line numberDiff line change
@@ -2626,10 +2626,10 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
26262626
bool isBitIntType() const; // Bit-precise integer type
26272627
bool isOpenCLSpecificType() const; // Any OpenCL specific type
26282628

2629-
bool isHLSLResourceType() const; // HLSL resource type
2629+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) bool is##Id##Type() const;
2630+
#include "clang/Basic/HLSLIntangibleTypes.def"
26302631
bool isHLSLSpecificType() const; // Any HLSL specific type
26312632

2632-
26332633
/// Determines if this type, which must satisfy
26342634
/// isObjCLifetimeType(), is implicitly __unsafe_unretained rather
26352635
/// than implicitly __strong.
@@ -3022,6 +3022,9 @@ class BuiltinType : public Type {
30223022
// AMDGPU types
30233023
#define AMDGPU_TYPE(Name, Id, SingletonId) Id,
30243024
#include "clang/Basic/AMDGPUTypes.def"
3025+
// HLSL intangible Types
3026+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) Id,
3027+
#include "clang/Basic/HLSLIntangibleTypes.def"
30253028
// All other builtin types
30263029
#define BUILTIN_TYPE(Id, SingletonId) Id,
30273030
#define LAST_BUILTIN_TYPE(Id) LastKind = Id
@@ -7891,12 +7894,17 @@ inline bool Type::isOpenCLSpecificType() const {
78917894
isQueueT() || isReserveIDT() || isPipeType() || isOCLExtOpaqueType();
78927895
}
78937896

7894-
inline bool Type::isHLSLResourceType() const {
7895-
return isSpecificBuiltinType(BuiltinType::HLSLResource);
7896-
}
7897+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
7898+
inline bool Type::is##Id##Type() const { \
7899+
return isSpecificBuiltinType(BuiltinType::Id); \
7900+
}
7901+
#include "clang/Basic/HLSLIntangibleTypes.def"
78977902

78987903
inline bool Type::isHLSLSpecificType() const {
7899-
return isHLSLResourceType();
7904+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) is##Id##Type() ||
7905+
return
7906+
#include "clang/Basic/HLSLIntangibleTypes.def"
7907+
false; // end boolean or operation
79007908
}
79017909

79027910
inline bool Type::isTemplateTypeParmType() const {

clang/include/clang/AST/TypeProperties.td

+4
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,10 @@ let Class = BuiltinType in {
865865
case BuiltinType::ID: return ctx.SINGLETON_ID;
866866
#include "clang/Basic/AMDGPUTypes.def"
867867

868+
#define HLSL_INTANGIBLE_TYPE(NAME, ID, SINGLETON_ID) \
869+
case BuiltinType::ID: return ctx.SINGLETON_ID;
870+
#include "clang/Basic/HLSLIntangibleTypes.def"
871+
868872
#define BUILTIN_TYPE(ID, SINGLETON_ID) \
869873
case BuiltinType::ID: return ctx.SINGLETON_ID;
870874
#include "clang/AST/BuiltinTypes.def"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//===-- HLSLIntangibleTypes.def - HLSL standard intangible types ----*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===--------------------------------------------------------------------------===//
8+
//
9+
// This file defines HLSL standard intangible types. These are implementation-
10+
// defined types such as handle types that have no defined object
11+
// representation or value representation and their size is unknown at compile
12+
// time.
13+
//
14+
// The macro is:
15+
//
16+
// HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
17+
//
18+
// where:
19+
//
20+
// - Name is the name of the builtin type.
21+
//
22+
// - BuiltinType::Id is the enumerator defining the type.
23+
//
24+
// - Context.SingletonId is the global singleton of this type.
25+
//
26+
// To include this file, define HLSL_INTANGIBLE_TYPE.
27+
// The macro will be undefined after inclusion.
28+
//
29+
//===----------------------------------------------------------------------===//
30+
31+
HLSL_INTANGIBLE_TYPE("__builtin_hlsl_resource_t", HLSLResource, HLSLResourceTy)
32+
33+
#undef HLSL_INTANGIBLE_TYPE

clang/include/clang/Serialization/ASTBitCodes.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1078,9 +1078,6 @@ enum PredefinedTypeIDs {
10781078
/// \brief The '__ibm128' type
10791079
PREDEF_TYPE_IBM128_ID = 74,
10801080

1081-
/// \brief The HLSL resource type
1082-
PREDEF_TYPE_HLSL_RESOURCE_ID = 75,
1083-
10841081
/// OpenCL image types with auto numeration
10851082
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
10861083
PREDEF_TYPE_##Id##_ID,
@@ -1103,6 +1100,9 @@ enum PredefinedTypeIDs {
11031100
// \brief AMDGPU types with auto numeration
11041101
#define AMDGPU_TYPE(Name, Id, SingletonId) PREDEF_TYPE_##Id##_ID,
11051102
#include "clang/Basic/AMDGPUTypes.def"
1103+
// \brief HLSL intangible types with auto numeration
1104+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) PREDEF_TYPE_##Id##_ID,
1105+
#include "clang/Basic/HLSLIntangibleTypes.def"
11061106

11071107
/// The placeholder type for unresolved templates.
11081108
PREDEF_TYPE_UNRESOLVED_TEMPLATE,

clang/include/module.modulemap

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module Clang_Basic {
6969
textual header "clang/Basic/DiagnosticOptions.def"
7070
textual header "clang/Basic/Features.def"
7171
textual header "clang/Basic/FPOptions.def"
72+
textual header "clang/Basic/HLSLIntangibleTypes.def"
7273
textual header "clang/Basic/MSP430Target.def"
7374
textual header "clang/Basic/LangOptions.def"
7475
textual header "clang/Basic/OpenCLExtensions.def"

clang/lib/AST/ASTContext.cpp

+12-8
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,11 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
13581358
#include "clang/Basic/OpenCLExtensionTypes.def"
13591359
}
13601360

1361-
InitBuiltinType(HLSLResourceTy, BuiltinType::HLSLResource);
1361+
if (LangOpts.HLSL) {
1362+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
1363+
InitBuiltinType(SingletonId, BuiltinType::Id);
1364+
#include "clang/Basic/HLSLIntangibleTypes.def"
1365+
}
13621366

13631367
if (Target.hasAArch64SVETypes()) {
13641368
#define SVE_TYPE(Name, Id, SingletonId) \
@@ -2161,12 +2165,6 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
21612165
Width = Target->getPointerWidth(AS);
21622166
Align = Target->getPointerAlign(AS);
21632167
break;
2164-
case BuiltinType::HLSLResource:
2165-
// TODO: We actually want this to have a size of zero, but for now we'll
2166-
// just treat it like a pointer to make progress.
2167-
Width = Target->getPointerWidth(LangAS::Default);
2168-
Align = Target->getPointerAlign(LangAS::Default);
2169-
break;
21702168
// The SVE types are effectively target-specific. The length of an
21712169
// SVE_VECTOR_TYPE is only known at runtime, but it is always a multiple
21722170
// of 128 bits. There is one predicate bit for each vector byte, so the
@@ -2223,6 +2221,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
22232221
Align = ALIGN; \
22242222
break;
22252223
#include "clang/Basic/AMDGPUTypes.def"
2224+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
2225+
#include "clang/Basic/HLSLIntangibleTypes.def"
2226+
Width = 0;
2227+
Align = 8;
2228+
break;
22262229
}
22272230
break;
22282231
case Type::ObjCObjectPointer:
@@ -8218,11 +8221,12 @@ static char getObjCEncodingForPrimitiveType(const ASTContext *C,
82188221
case BuiltinType::OCLQueue:
82198222
case BuiltinType::OCLReserveID:
82208223
case BuiltinType::OCLSampler:
8221-
case BuiltinType::HLSLResource:
82228224
case BuiltinType::Dependent:
82238225
#define PPC_VECTOR_TYPE(Name, Id, Size) \
82248226
case BuiltinType::Id:
82258227
#include "clang/Basic/PPCTypes.def"
8228+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
8229+
#include "clang/Basic/HLSLIntangibleTypes.def"
82268230
#define BUILTIN_TYPE(KIND, ID)
82278231
#define PLACEHOLDER_TYPE(KIND, ID) \
82288232
case BuiltinType::KIND:

clang/lib/AST/ASTImporter.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,10 @@ ExpectedType ASTNodeImporter::VisitBuiltinType(const BuiltinType *T) {
11031103
case BuiltinType::Id: \
11041104
return Importer.getToContext().SingletonId;
11051105
#include "clang/Basic/AMDGPUTypes.def"
1106+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
1107+
case BuiltinType::Id: \
1108+
return Importer.getToContext().SingletonId;
1109+
#include "clang/Basic/HLSLIntangibleTypes.def"
11061110
#define SHARED_SINGLETON_TYPE(Expansion)
11071111
#define BUILTIN_TYPE(Id, SingletonId) \
11081112
case BuiltinType::Id: return Importer.getToContext().SingletonId;

clang/lib/AST/ExprConstant.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -11845,7 +11845,6 @@ GCCTypeClass EvaluateBuiltinClassifyType(QualType T,
1184511845
case BuiltinType::OCLClkEvent:
1184611846
case BuiltinType::OCLQueue:
1184711847
case BuiltinType::OCLReserveID:
11848-
case BuiltinType::HLSLResource:
1184911848
#define SVE_TYPE(Name, Id, SingletonId) \
1185011849
case BuiltinType::Id:
1185111850
#include "clang/Basic/AArch64SVEACLETypes.def"
@@ -11858,6 +11857,8 @@ GCCTypeClass EvaluateBuiltinClassifyType(QualType T,
1185811857
#include "clang/Basic/WebAssemblyReferenceTypes.def"
1185911858
#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
1186011859
#include "clang/Basic/AMDGPUTypes.def"
11860+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
11861+
#include "clang/Basic/HLSLIntangibleTypes.def"
1186111862
return GCCTypeClass::None;
1186211863

1186311864
case BuiltinType::Dependent:

clang/lib/AST/ItaniumMangle.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -3374,9 +3374,6 @@ void CXXNameMangler::mangleType(const BuiltinType *T) {
33743374
Out << type_name.size() << type_name; \
33753375
break;
33763376
#include "clang/Basic/OpenCLExtensionTypes.def"
3377-
case BuiltinType::HLSLResource:
3378-
Out << "25__builtin_hlsl_resource_t";
3379-
break;
33803377
// The SVE types are effectively target-specific. The mangling scheme
33813378
// is defined in the appendices to the Procedure Call Standard for the
33823379
// Arm Architecture.
@@ -3432,6 +3429,12 @@ void CXXNameMangler::mangleType(const BuiltinType *T) {
34323429
Out << 'u' << type_name.size() << type_name; \
34333430
break;
34343431
#include "clang/Basic/AMDGPUTypes.def"
3432+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
3433+
case BuiltinType::Id: \
3434+
type_name = Name; \
3435+
Out << type_name.size() << type_name; \
3436+
break;
3437+
#include "clang/Basic/HLSLIntangibleTypes.def"
34353438
}
34363439
}
34373440

clang/lib/AST/MicrosoftMangle.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -2576,10 +2576,6 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers,
25762576
break;
25772577
#include "clang/Basic/OpenCLExtensionTypes.def"
25782578

2579-
case BuiltinType::HLSLResource:
2580-
mangleArtificialTagType(TagTypeKind::Struct, "__builtin_hlsl_resource_t");
2581-
break;
2582-
25832579
case BuiltinType::NullPtr:
25842580
Out << "$$T";
25852581
break;
@@ -2606,8 +2602,14 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers,
26062602
mangleArtificialTagType(TagTypeKind::Struct, MangledName); \
26072603
mangleArtificialTagType(TagTypeKind::Struct, MangledName, {"__clang"}); \
26082604
break;
2609-
26102605
#include "clang/Basic/WebAssemblyReferenceTypes.def"
2606+
2607+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
2608+
case BuiltinType::Id: \
2609+
mangleArtificialTagType(TagTypeKind::Struct, Name); \
2610+
break;
2611+
#include "clang/Basic/HLSLIntangibleTypes.def"
2612+
26112613
#define SVE_TYPE(Name, Id, SingletonId) \
26122614
case BuiltinType::Id:
26132615
#include "clang/Basic/AArch64SVEACLETypes.def"

clang/lib/AST/NSAPI.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ NSAPI::getNSNumberFactoryMethodKind(QualType T) const {
443443
case BuiltinType::OCLClkEvent:
444444
case BuiltinType::OCLQueue:
445445
case BuiltinType::OCLReserveID:
446-
case BuiltinType::HLSLResource:
447446
#define SVE_TYPE(Name, Id, SingletonId) \
448447
case BuiltinType::Id:
449448
#include "clang/Basic/AArch64SVEACLETypes.def"
@@ -456,6 +455,8 @@ NSAPI::getNSNumberFactoryMethodKind(QualType T) const {
456455
#include "clang/Basic/WebAssemblyReferenceTypes.def"
457456
#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
458457
#include "clang/Basic/AMDGPUTypes.def"
458+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
459+
#include "clang/Basic/HLSLIntangibleTypes.def"
459460
case BuiltinType::BoundMember:
460461
case BuiltinType::UnresolvedTemplate:
461462
case BuiltinType::Dependent:

clang/lib/AST/PrintfFormatString.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ bool PrintfSpecifier::fixType(QualType QT, const LangOptions &LangOpt,
867867
#include "clang/Basic/WebAssemblyReferenceTypes.def"
868868
#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
869869
#include "clang/Basic/AMDGPUTypes.def"
870+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
871+
#include "clang/Basic/HLSLIntangibleTypes.def"
870872
#define SIGNED_TYPE(Id, SingletonId)
871873
#define UNSIGNED_TYPE(Id, SingletonId)
872874
#define FLOATING_TYPE(Id, SingletonId)

clang/lib/AST/Type.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -3481,8 +3481,6 @@ StringRef BuiltinType::getName(const PrintingPolicy &Policy) const {
34813481
return "queue_t";
34823482
case OCLReserveID:
34833483
return "reserve_id_t";
3484-
case HLSLResource:
3485-
return "__builtin_hlsl_resource_t";
34863484
case IncompleteMatrixIdx:
34873485
return "<incomplete matrix index type>";
34883486
case ArraySection:
@@ -3515,6 +3513,10 @@ StringRef BuiltinType::getName(const PrintingPolicy &Policy) const {
35153513
case Id: \
35163514
return Name;
35173515
#include "clang/Basic/AMDGPUTypes.def"
3516+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
3517+
case Id: \
3518+
return Name;
3519+
#include "clang/Basic/HLSLIntangibleTypes.def"
35183520
}
35193521

35203522
llvm_unreachable("Invalid builtin type.");
@@ -4774,7 +4776,6 @@ bool Type::canHaveNullability(bool ResultIfUnknown) const {
47744776
case BuiltinType::OCLClkEvent:
47754777
case BuiltinType::OCLQueue:
47764778
case BuiltinType::OCLReserveID:
4777-
case BuiltinType::HLSLResource:
47784779
#define SVE_TYPE(Name, Id, SingletonId) \
47794780
case BuiltinType::Id:
47804781
#include "clang/Basic/AArch64SVEACLETypes.def"
@@ -4787,6 +4788,8 @@ bool Type::canHaveNullability(bool ResultIfUnknown) const {
47874788
#include "clang/Basic/WebAssemblyReferenceTypes.def"
47884789
#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
47894790
#include "clang/Basic/AMDGPUTypes.def"
4791+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
4792+
#include "clang/Basic/HLSLIntangibleTypes.def"
47904793
case BuiltinType::BuiltinFn:
47914794
case BuiltinType::NullPtr:
47924795
case BuiltinType::IncompleteMatrixIdx:

clang/lib/AST/TypeLoc.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const {
418418
case BuiltinType::OCLClkEvent:
419419
case BuiltinType::OCLQueue:
420420
case BuiltinType::OCLReserveID:
421-
case BuiltinType::HLSLResource:
422421
#define SVE_TYPE(Name, Id, SingletonId) \
423422
case BuiltinType::Id:
424423
#include "clang/Basic/AArch64SVEACLETypes.def"
@@ -431,6 +430,8 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const {
431430
#include "clang/Basic/WebAssemblyReferenceTypes.def"
432431
#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
433432
#include "clang/Basic/AMDGPUTypes.def"
433+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
434+
#include "clang/Basic/HLSLIntangibleTypes.def"
434435
case BuiltinType::BuiltinFn:
435436
case BuiltinType::IncompleteMatrixIdx:
436437
case BuiltinType::ArraySection:

clang/lib/CodeGen/CGDebugInfo.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,10 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
743743
case BuiltinType::Id: \
744744
return getOrCreateStructPtrType("opencl_" #ExtType, Id##Ty);
745745
#include "clang/Basic/OpenCLExtensionTypes.def"
746-
747-
case BuiltinType::HLSLResource:
748-
return getOrCreateStructPtrType("__builtin_hlsl_resource_t",
749-
HLSLResourceTy);
746+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
747+
case BuiltinType::Id: \
748+
return getOrCreateStructPtrType(Name, SingletonId);
749+
#include "clang/Basic/HLSLIntangibleTypes.def"
750750

751751
#define SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
752752
#include "clang/Basic/AArch64SVEACLETypes.def"

clang/lib/CodeGen/CGDebugInfo.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ class CGDebugInfo {
8181
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
8282
llvm::DIType *Id##Ty = nullptr;
8383
#include "clang/Basic/OpenCLExtensionTypes.def"
84-
llvm::DIType *HLSLResourceTy = nullptr;
8584
#define WASM_TYPE(Name, Id, SingletonId) llvm::DIType *SingletonId = nullptr;
8685
#include "clang/Basic/WebAssemblyReferenceTypes.def"
8786
#define AMDGPU_TYPE(Name, Id, SingletonId) llvm::DIType *SingletonId = nullptr;
8887
#include "clang/Basic/AMDGPUTypes.def"
88+
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
89+
llvm::DIType *SingletonId = nullptr;
90+
#include "clang/Basic/HLSLIntangibleTypes.def"
8991

9092
/// Cache of previously constructed Types.
9193
llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache;

0 commit comments

Comments
 (0)