[PATCH] D73307: Unique Names for Functions with Internal Linkage

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 14:10:41 PDT 2020


MaskRay added inline comments.


================
Comment at: clang/docs/UsersManual.rst:1684
+   linkage symbols. The unique name is obtained by appending the hash of the
+   full module name to the original symbol. This option is particularly useful
+   in attributing profile information to the correct function when multiple
----------------
rnk wrote:
> I think it's important to be specific here. I'd go so far as to say:
> "When this option is set, compiler hashes the main source file path from the command line and appends it to all internal symbols. If a program contains multiple objects compiled from the same source file path, the symbols are not guaranteed to be unique."
Should option like -ffile-prefix-map= affect the hashed source file path? I suspect it already does this but I haven't verified.

This may need tests for Windows and non-Windows, similar to D77223.


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

https://reviews.llvm.org/D73307





More information about the cfe-commits mailing list