Path: blob/main/contrib/llvm-project/llvm/lib/Target/DirectX/CBufferDataLayout.h
35294 views
//===- Target/DirectX/CBufferDataLayout.h - Cbuffer layout helper ---------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// Utils to help cbuffer layout.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_TARGET_DIRECTX_CBUFFERDATALAYOUT_H13#define LLVM_TARGET_DIRECTX_CBUFFERDATALAYOUT_H1415#include "llvm/Support/TypeSize.h"1617#include <memory>18#include <stdint.h>1920namespace llvm {21class DataLayout;22class Type;2324namespace dxil {2526class LegacyCBufferLayout;2728class CBufferDataLayout {29const DataLayout &DL;30const bool IsLegacyLayout;31std::unique_ptr<LegacyCBufferLayout> LegacyDL;3233public:34CBufferDataLayout(const DataLayout &DL, const bool IsLegacy);35~CBufferDataLayout();36llvm::TypeSize getTypeAllocSizeInBytes(Type *Ty);37};3839} // namespace dxil40} // namespace llvm4142#endif434445