dblaikie added a comment. In D94639#2496923 <https://reviews.llvm.org/D94639#2496923>, @akhuang wrote:
> In D94639#2496892 <https://reviews.llvm.org/D94639#2496892>, @dblaikie wrote: > >> What parts of this are motivated by CodeView requirements (do functions have >> to have unique names in CV?)? >> It'd be a bit unfortunate if we have divergence in -gmlt behavior between >> DWARF and CodeView due to different usage requirements, rather than format >> requirements - gmlt in DWARF I think uses only the unqualified name, though >> eventually combined with -fdebug-info-for-profiling which put the mangled >> name on such functions to make it clear for profilers. (though the >> unqualified name only behavior is still handy for the sanitizers - where the >> unqualified/ambiguous name is a "good enough" point for size V accuracy) > > This was kind of motivated by the issue in > https://bugs.llvm.org/show_bug.cgi?id=48432, even though this patch doesn't > solve that particular bug. I guess the general issue is that in CV the only > way to make the functions unique is by their display name or type. So > previously we were going in the direction of differentiating functions by the > display name (like using the qualified name), but it seems like it's more > size-efficient to use types instead, which is what this patch does. OK - thanks for walking me through it, that sounds good to me. Might be worth rephrasing from "emit type information for function scopes" to "emit parent/context scopes for functions, using declarations for any scopes that are types". (my own fault, but reading this quickly, I assumed it was about emitting type information for the parameters (DWARF gmlt drops the parameters/types)) How does any of this deal with overloading? I guess for either solution (qualified name or real scopes) you have to include all the parameter type info too to avoid the functions being treated as identical/duplicate by CV? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94639/new/ https://reviews.llvm.org/D94639 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits