[clang] [NFC] Updating Debug Info generation for 'this' (PR #119445)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 13:25:36 PST 2024


bogner wrote:

> Don't see a problem with this but could we elaborate on the motivation for this? Looks like this is required for #119041? Why is that?
> 
> The original change this is based on is: [microsoft/DirectXShaderCompiler#6296](https://github.com/microsoft/DirectXShaderCompiler/pull/6296)? Which makes it sounds like it does affect the generated debug-info. I'm confused as to what's NFC and what's not

This PR is entirely NFC. #119041 additionally has a functional change - the relevant part of which is the addition of an overload:
```c++
llvm::DIType *CGDebugInfo::CreateType(const HLSLAttributedResourceType *Ty,
                                      llvm::DIFile *U) {
  return getOrCreateType(Ty->getWrappedType(), U);
}
```

The reason this change is needed for that PR, is that this new overload needs to be called whether or not we're dealing with a function specialization, but since the code as is special-cases specializations we don't ever call the overloaded CreateType.

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


More information about the cfe-commits mailing list