From cb2d56ce960714ce6fce39e8b846326969a30c2d Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 7 Aug 2025 16:10:50 -0700 Subject: [NFC][HLSL][DirectX] Consolidate `ResourceClassNames` (#152213) During the split of the various `Frontend/HLSL` libraries, there was an oversight to duplicate the `ResourceClassNames` definitions. This commit simply consolidates the definitions into `DXContainer.h` as `getResourceClasses` --- llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp') diff --git a/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp b/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp index 79904fc..574883e 100644 --- a/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp +++ b/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp @@ -92,16 +92,9 @@ static raw_ostream &operator<<(raw_ostream &OS, return OS; } -static const EnumEntry ResourceClassNames[] = { - {"CBV", dxil::ResourceClass::CBuffer}, - {"SRV", dxil::ResourceClass::SRV}, - {"UAV", dxil::ResourceClass::UAV}, - {"Sampler", dxil::ResourceClass::Sampler}, -}; - static raw_ostream &operator<<(raw_ostream &OS, const ClauseType &Type) { OS << enumToStringRef(dxil::ResourceClass(llvm::to_underlying(Type)), - ArrayRef(ResourceClassNames)); + dxbc::getResourceClasses()); return OS; } -- cgit v1.1