[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 09:37:31 PST 2023


rnk wrote:

> I guess that's https://github.com/llvm/llvm-project/commit/b2615aa44d0cabd821b7afe5acdc847af9937c76... but I'm pretty sure we fixed -fdata-sections so the backend automatically generates comdats. So maybe we should just revert that.

That seems reasonable, however, there are other QOI reasons for attempting to generate globally unique names for lambdas. The debug info which describes them relies on having unique mangled names, if there are duplicates, the debugger will not be able to find the correct type information.

I think our strategy to ensure internal lambdas like this are globally unique is that they appear in some externally visible scope which can only be defined once, and that scope gets mangled into the name of the lambda. Is that happening here? I don't have an MS demangler handy to confirm against the test case.

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


More information about the cfe-commits mailing list