clang 24.0.0git
HLSLExternalSemaSource.cpp File Reference
#include "clang/Sema/HLSLExternalSemaSource.h"
#include "HLSLBuiltinTypeDeclBuilder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/Type.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaHLSL.h"
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"

Go to the source code of this file.

Classes

class  BuiltinTypeDeclBuilder

Enumerations

enum class  HLSLBufferType { Typed , Structured , Constant }
enum class  AtomicOverloadShape { Binary , BinaryWithOriginal , CompareStore , CompareExchange }

Functions

static NamespaceDecl * createImplicitNamespace (Sema &S, StringRef Name, DeclContext *DC)
static BuiltinTypeDeclBuilder setupBufferType (CXXRecordDecl *Decl, Sema &S, ResourceClass RC, bool IsROV, bool RawBuffer, bool HasCounter)
 Set up common members and attributes for buffer types.
static BuiltinTypeDeclBuilder setupSamplerType (CXXRecordDecl *Decl, Sema &S)
 Set up common members and attributes for sampler types.
static BuiltinTypeDeclBuilder setupTextureType (CXXRecordDecl *Decl, Sema &S, const TextureTypeInfo &T)
static ClassTemplatePartialSpecializationDecl * addVectorTexturePartialSpecialization (Sema &S, NamespaceDecl *HLSLNamespace, ClassTemplateDecl *TextureTemplate)
static Expr * constructTypedBufferConstraintExpr (Sema &S, SourceLocation NameLoc, TemplateTypeParmDecl *T)
static Expr * constructConstantBufferConstraintExpr (Sema &S, SourceLocation NameLoc, TemplateTypeParmDecl *T)
static Expr * constructStructuredBufferConstraintExpr (Sema &S, SourceLocation NameLoc, TemplateTypeParmDecl *T)
static ConceptDecl * constructBufferConceptDecl (Sema &S, NamespaceDecl *NSD, HLSLBufferType BT)
static void buildAtomicOverload (Sema &S, NamespaceDecl *NS, StringRef FuncName, StringRef BuiltinName, QualType ElemTy, LangAS DestAS, AtomicOverloadShape Shape)
static void defineHLSLInterlockedFunc (Sema &S, NamespaceDecl *NS, StringRef FuncName, StringRef BuiltinName, bool RequiresOriginalValue=false, bool SupportsFloat=false)
static void defineHLSLInterlockedCompareFunc (Sema &S, NamespaceDecl *NS, StringRef FuncName, StringRef BuiltinName, AtomicOverloadShape Shape)
static void defineHLSLInterlockedCompareFuncFloat (Sema &S, NamespaceDecl *NS, StringRef FuncName, StringRef BuiltinName, AtomicOverloadShape Shape)

Variables

static const TextureTypeInfo TextureTypes []

Enumeration Type Documentation

◆ AtomicOverloadShape

enum class AtomicOverloadShape
strong
Enumerator
Binary 
BinaryWithOriginal 
CompareStore 
CompareExchange 

Definition at line 878 of file HLSLExternalSemaSource.cpp.

◆ HLSLBufferType

enum class HLSLBufferType
strong
Enumerator
Typed 
Structured 
Constant 

Definition at line 617 of file HLSLExternalSemaSource.cpp.

Function Documentation

◆ addVectorTexturePartialSpecialization()

◆ buildAtomicOverload()

◆ constructBufferConceptDecl()

◆ constructConstantBufferConstraintExpr()

Expr * constructConstantBufferConstraintExpr ( Sema & S,
SourceLocation NameLoc,
TemplateTypeParmDecl * T )
static

◆ constructStructuredBufferConstraintExpr()

◆ constructTypedBufferConstraintExpr()

Expr * constructTypedBufferConstraintExpr ( Sema & S,
SourceLocation NameLoc,
TemplateTypeParmDecl * T )
static

◆ createImplicitNamespace()

◆ defineHLSLInterlockedCompareFunc()

◆ defineHLSLInterlockedCompareFuncFloat()

void defineHLSLInterlockedCompareFuncFloat ( Sema & S,
NamespaceDecl * NS,
StringRef FuncName,
StringRef BuiltinName,
AtomicOverloadShape Shape )
static

◆ defineHLSLInterlockedFunc()

void defineHLSLInterlockedFunc ( Sema & S,
NamespaceDecl * NS,
StringRef FuncName,
StringRef BuiltinName,
bool RequiresOriginalValue = false,
bool SupportsFloat = false )
static

◆ setupBufferType()

◆ setupSamplerType()

◆ setupTextureType()

BuiltinTypeDeclBuilder setupTextureType ( CXXRecordDecl * Decl,
Sema & S,
const TextureTypeInfo & T )
static

Definition at line 394 of file HLSLExternalSemaSource.cpp.

References clang::hlsl::BuiltinTypeDeclBuilder::addArraySubscriptOperators(), clang::hlsl::BuiltinTypeDeclBuilder::addCalculateLodMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addCopyAssignmentOperator(), clang::hlsl::BuiltinTypeDeclBuilder::addCopyConstructor(), clang::hlsl::BuiltinTypeDeclBuilder::addDefaultHandleConstructor(), clang::hlsl::BuiltinTypeDeclBuilder::addGatherCmpMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addGatherMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addGetDimensionsMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addHeapResourceInfoConstructor(), clang::hlsl::BuiltinTypeDeclBuilder::addMipsMember(), clang::hlsl::BuiltinTypeDeclBuilder::addRWTextureLoadMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleBiasMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleCmpLevelZeroMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleCmpMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleGradMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleLevelMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addSampleMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addStaticInitializationFunctions(), clang::hlsl::BuiltinTypeDeclBuilder::addTextureHandle(), clang::hlsl::BuiltinTypeDeclBuilder::addTextureLoadMethods(), clang::hlsl::BuiltinTypeDeclBuilder::addTextureLoadMSMethods(), clang::Sema::BuildDeclRefExpr(), clang::cast(), clang::Dim, clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::T, and clang::VK_PRValue.

Variable Documentation

◆ TextureTypes

const TextureTypeInfo TextureTypes[]
static

Definition at line 342 of file HLSLExternalSemaSource.cpp.