[llvm] [DirectX] Add Range Overlap validation (PR #152229)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 16:55:50 PDT 2025
================
@@ -33,6 +33,20 @@ class DXILResourceTypeMap;
namespace dxil {
+inline StringRef getResourceClassName(ResourceClass RC) {
----------------
bogner wrote:
This isn't an appropriate place for this function - the enum is defined in `Support/DXILABI.h` and this is just an arbitrary user of that that happens to also be a dependency of where you're using this functionality. Also, it's not a "great" practice to have a bunch of string literals in an inline function in a header - these will end up as duplicate data in every translation unit and we have to rely on the linker to clean it all up later.
I guess it would probably be best to add a `DXILABI.cpp` in Support and out-of-line the resource class enum stringify-ing function there.
https://github.com/llvm/llvm-project/pull/152229
More information about the llvm-commits
mailing list