[PATCH] D89617: Prepend "uniq" to symbol names hash with -funique-internal-linkage-names

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 12:39:34 PDT 2020


mtrofin added a comment.

In D89617#2339557 <https://reviews.llvm.org/D89617#2339557>, @tmsriram wrote:

> Incorporating snehasishk@'s suggestion that "llvmuniq" is a better prefix for tools to search on.
>
> Having "llvmuniq" makes reduces chances of collisions with other suffixes that might get introduced.  Consistent with the ".llvm." prefix for lto global name promotion suffixes.

Unique-ing names this way isn't, at core, something that's too tied to llvm, even if we implement it here first. There are tools that would leverage this feature by binding to the suffix. With a look at other present or future compilers, and given that making this decision now is free, and much more expensive later, I think it would be beneficial if we were intentional about:

- not using "llvm" to indicate this is something tool-generated, and instead use, say "__" (".__uniq.")

or

- using "llvm", on the grounds that there are other examples of general-purpose concepts that have tool-specific prefixes (like gcc_except_table, that is supported in llvm); so the prefixed name is basically a proper noun, it doesn't mean "llvm only" or "gcc only".

I believe either way, the ".llvm." case is going to stick out as an inconsistency: it should have been either ".llvmlto." or "__lto", in either case, I don't think it serves too well as an argument for the llvm prefix.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89617/new/

https://reviews.llvm.org/D89617



More information about the llvm-commits mailing list