[llvm] [DebugInfo] Add an specification_of attribute to LLVM DebugInfo (PR #115362)

Augusto Noronha via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 10:33:38 PST 2024


augusto2112 wrote:

> I'd probably call the attribute just "specification" same as DWARF does?
> 
> but also it worries me a bit - the reason we haven't had "specification" in LLVM IR debug info for types so far is that we never have a declaration and a definition of the same type simultaneously - we deduplicate them via the `identifier` if we're merging modules, etc.
> 
> So, yeah, maybe a bit more detail on how this works - and maybe it deserves a different name once we look at the details.

I see. On the Swift side this works since the identifiers (type mangled names) are different: you have a generic "Type<T>" and a specification "Type<Int>", "Type<Double>", etc. I can remove any references to C++ if needed, but I'll leave it to @Michael137 to decide if we can adapt this for C++ or not.

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


More information about the llvm-commits mailing list