20  assert((HandleTy->getName().ends_with(
".CBuffer") ||
 
   21          HandleTy->getName() == 
"spirv.VulkanBuffer") &&
 
   22         "Not a cbuffer type");
 
   23  assert(HandleTy->getNumTypeParameters() == 1 && 
"Expected layout type");
 
   26  assert(LayoutTy->getName().ends_with(
".Layout") && 
"Not a layout type");
 
   29  size_t ParamIndex = Index + 1;
 
   30  assert(LayoutTy->getNumIntParameters() > ParamIndex &&
 
   31         "Not enough parameters");
 
   33  return LayoutTy->getIntParameter(ParamIndex);
 
 
   37  NamedMDNode *CBufMD = M.getNamedMetadata(
"hlsl.cbs");
 
   41  std::optional<CBufferMetadata> Result({CBufMD});
 
   44    assert(MD->getNumOperands() && 
"Invalid cbuffer metadata");
 
   55    for (
int I = 1, E = MD->getNumOperands(); 
I < E; ++
I) {
 
 
   70  MD->eraseFromParent();
 
 
   75  int64_t 
TypeSize = 
DL.getTypeSizeInBits(Ty->getElementType()) / 8;
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
 
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
 
static size_t getMemberOffset(GlobalVariable *Handle, size_t Index)
 
Module.h This file contains the declarations for the Module class.
 
Class for arbitrary precision integers.
 
Class to represent array types.
 
A parsed version of the target data layout string in and methods for querying it.
 
Type * getValueType() const
 
A Module instance is used to store all the information related to an LLVM module.
 
iterator_range< op_iterator > operands()
 
const unsigned CBufferRowSizeInBytes
 
APInt translateCBufArrayOffset(const DataLayout &DL, APInt Offset, ArrayType *Ty)
 
This is an optimization pass for GlobalISel generic memory operations.
 
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
 
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
 
This struct is a compact representation of a valid (non-zero power of two) alignment.
 
SmallVector< CBufferMember > Members