15#ifndef LLVM_CLANG_LIB_CODEGEN_CGHLSLRUNTIME_H
16#define LLVM_CLANG_LIB_CODEGEN_CGHLSLRUNTIME_H
18#include "llvm/IR/IRBuilder.h"
22#include "llvm/ADT/SmallVector.h"
23#include "llvm/ADT/StringRef.h"
24#include "llvm/Frontend/HLSL/HLSLResource.h"
39class HLSLResourceBindingAttr;
53 std::optional<unsigned>
Reg;
66 std::vector<std::pair<llvm::GlobalVariable *, unsigned>>
Constants;
92 void addBufferResourceAnnotation(llvm::GlobalVariable *GV,
93 llvm::StringRef TyName,
94 llvm::hlsl::ResourceClass RC,
95 llvm::hlsl::ResourceKind RK,
Defines helper utilities for supporting the HLSL runtime environment.
Attr - This represents one attribute.
void setHLSLEntryAttributes(const FunctionDecl *FD, llvm::Function *Fn)
void emitEntryFunction(const FunctionDecl *FD, llvm::Function *Fn)
llvm::Value * emitInputSemantic(llvm::IRBuilder<> &B, const ParmVarDecl &D, llvm::Type *Ty)
CGHLSLRuntime(CodeGenModule &CGM)
void annotateHLSLResource(const VarDecl *D, llvm::GlobalVariable *GV)
void addBuffer(const HLSLBufferDecl *D)
void generateGlobalCtorDtorCalls()
void setHLSLFunctionAttributes(llvm::Function *, const FunctionDecl *)
This class organizes the cross-function state that is used while generating LLVM code.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Represents a function declaration or definition.
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Represents a parameter to a function.
Represents a variable declaration or definition.
YAML serialization mapping.
std::optional< unsigned > Reg
std::vector< std::pair< llvm::GlobalVariable *, unsigned > > Constants
llvm::StructType * LayoutStruct