[clang] [llvm] [HLSL] Print struct body definition when within the context of defining a target extension type (PR #115971)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 12:07:03 PST 2024


bogner wrote:

This doesn't look right to me. Changing the type printer so it doesn't differentiate between named and anonymous structs inside a target extension type like this looks like it will break round-tripping through LLVM IR, since the fact that this was associated with a named struct and not an anonymous one is lost.

I suspect we're actually creating the wrong types (in DirectXTargetCodeGenInfo::getHLSLType) in the first place, since target extension types don't seem to handle named structs at all. Additionally, we should probably add checks when creating a target extension type to prevent creating them with named struct types.

https://github.com/llvm/llvm-project/pull/115971


More information about the cfe-commits mailing list