[clang] [MS-ABI] create unique vftable name for vftable defined with internal alias. (PR #71748)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 10:11:01 PST 2023


rnk wrote:

> In the testcase, the lambda is just at global scope. Not sure what you're expecting to happen here.

I think that's what I'm trying to get at, this strategy is incomplete and didn't work.

I think a principled fix to the general problem would be to incorporate the anonymous namespace hash into the names of all internal lambdas. The point where we check the lambda mangling number is the point where we know if we have an internal or external lambda and decide accordingly:
https://github.com/llvm/llvm-project/blob/11f52f783a64acef671a2b1648a40ba683ad4717/clang/lib/AST/MicrosoftMangle.cpp#L1125

Also this logic has been duplicated, that doesn't seem good:
https://github.com/llvm/llvm-project/blob/11f52f783a64acef671a2b1648a40ba683ad4717/clang/lib/AST/MicrosoftMangle.cpp#L268

To your point, we shouldn't special case vftables, since this solves a more general problem of debug info quality.

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


More information about the cfe-commits mailing list