[clang] [HLSL] Fix resource wrapper declaration (PR #125718)
Steven Perron via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 11:48:05 PST 2025
s-perron wrote:
> 2\. It feels wrong to do this in CodeGen. It seems like we should be identifying an appropriate storage class in Sema such that we assign the correct linkage automatically.
If we change the storage class in Sema, then codegen is not able to distinguish between:
```
static RWBuffer<int4> s;
RWBuffer<int4> global;
```
This causes problems during codegen because the resource init function is created only for the "global" variables, and not static. We could probably refactor that to make it work. Just be aware that it might be a bigger change than you might expect.
https://github.com/llvm/llvm-project/pull/125718
More information about the cfe-commits
mailing list