LLVM 22.0.0git
DXILABI.cpp
Go to the documentation of this file.
1//===-- DXILABI.cpp - ABI Sensitive Values for DXIL -----------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains definitions of various constants and enums that are
10// required to remain stable as per the DXIL format's requirements.
11//
12// Documentation for DXIL can be found in
13// https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst.
14//
15//===----------------------------------------------------------------------===//
16
19using namespace llvm;
20
22 switch (RC) {
23 case dxil::ResourceClass::SRV:
24 return "SRV";
25 case dxil::ResourceClass::UAV:
26 return "UAV";
27 case dxil::ResourceClass::CBuffer:
28 return "CBV";
29 case dxil::ResourceClass::Sampler:
30 return "Sampler";
31 }
32 llvm_unreachable("Invalid ResourceClass enum value");
33}
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_ABI StringRef getResourceClassName(ResourceClass RC)
Definition: DXILABI.cpp:21
ResourceClass
Definition: DXILABI.h:26
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18