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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 17:11:12 PST 2023


efriedma-quic wrote:

> Why are we creating a comdat here in the first place? 

I guess that's b2615aa4... but I'm pretty sure we fixed -fdata-sections so the backend automatically generates comdats.  So maybe we should just revert that.

> If we allow creating a comdat associated with an internal symbol, the backend should handle it correctly; it's a bug if it crashes like you've described. (I'm not sure how to reproduce the crash with your testcase, though.)

LangRef says "Because the name of the object must match the name of the COMDAT group, the linkage of the global object must not be local; local symbols can get renamed if a collision occurs in the symbol table."  I think that means the IR clang generates is illegal, but I guess nothing in the backend actually checks this.

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


More information about the cfe-commits mailing list