[llvm] [dsymutil] Fix parallel linker's self-recursive typedef DIE by including referred-to types into synthetic name (PR #166767)

Roy Shi via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 08:37:49 PST 2025


royitaqi wrote:

> > Caveat is that it won't work if any of the referenced types resolve to the same name for some reason (similar to how the two typedefs resolved to the same name before this patch).
> 
> ...this still worries me. Not like it's a common scenario, but it would be nice for the solution to be complete. Could you elaborate on the scenario you had in mind? Maybe I'm misunderstanding, but I _think_ that would constitute a redefinition error in C++. The reason the typedef chain you have in your test is legal, is that it's just a simple redeclaration.
> 
> I'm by no means an expert on the internals of dsymutil, so I'll defer to @JDevlieghere @avl-llvm re. implementation. But the idea makes sense to me.

Sorry for the confusion. It was just a hypothetical caveat that I can think of. I have no evidence to support or deny such hypothesis. I will look up to @JDevlieghere  and @avl-llvm for their understanding of if such case actually exists.

Let me update that text so that it's clear that it's hypothetical.

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


More information about the llvm-commits mailing list