14#ifndef LLVM_CLANG_AST_HLSLRESOURCE_H
15#define LLVM_CLANG_AST_HLSLRESOURCE_H
23#include "llvm/Frontend/HLSL/HLSLResource.h"
24#include "llvm/Support/raw_ostream.h"
28class HLSLResourceBindingAttr;
29class HLSLRVkBindingAttr;
54 llvm_unreachable(
"no explicit binding");
71 return RegBinding->getImplicitBindingOrderID();
89 return RegBinding->getImplicitCounterBindingOrderID();
95 case llvm::dxil::ResourceDimension::Dim1D:
98 case llvm::dxil::ResourceDimension::Dim2D:
101 case llvm::dxil::ResourceDimension::Dim3D:
102 case llvm::dxil::ResourceDimension::Cube:
105 case llvm::dxil::ResourceDimension::Unknown:
107 "We cannot get the dimension of a resource with unknown dimension.");
109 llvm_unreachable(
"Unhandled llvm::dxil::ResourceDimension enum.");
120 inline static constexpr std::string_view BaseClassDelim =
"::";
121 inline static constexpr std::string_view FieldDelim =
".";
122 inline static constexpr std::string_view ArrayIndexDelim = FieldDelim;
133 assert(!Offsets.empty() &&
"no name to pop");
134 Name.resize(Offsets.pop_back_val());
142 void pushName(llvm::StringRef N, llvm::StringRef Delim);
Defines the clang::ASTContext interface.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
const TargetInfo & getTargetInfo() const
Decl - This represents one declaration (or definition), e.g.
ASTContext & getASTContext() const LLVM_READONLY
One of these records is kept for each identifier that is lexed.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
void pushName(llvm::StringRef N)
EmbeddedResourceNameBuilder(llvm::StringRef BaseName)
void pushArrayIndex(uint64_t Index)
EmbeddedResourceNameBuilder()
void pushBaseName(llvm::StringRef N)
IdentifierInfo * getNameAsIdentifier(ASTContext &AST) const
Defines the clang::TargetInfo interface.
uint32_t getResourceDimensions(llvm::dxil::ResourceDimension Dim)
The JSON file list parser is used to communicate input to InstallAPI.
unsigned getImplicitOrderID() const
void setCounterImplicitOrderID(unsigned Value) const
bool hasCounterImplicitOrderID() const
unsigned getSpace() const
HLSLVkBindingAttr * VkBinding
unsigned getCounterImplicitOrderID() const
ResourceBindingAttrs(const Decl *D)
bool hasImplicitOrderID() const
HLSLResourceBindingAttr * RegBinding
void setImplicitOrderID(unsigned Value) const