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

David Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 11:21:16 PDT 2020


davidxl added inline comments.


================
Comment at: clang/docs/UsersManual.rst:1683
+   Controls whether Clang emits a unique (best-effort) symbol name for internal
+   linkage symbols. The unique name is obtained by appending the MD5 hash of the
+   full module name to the original symbol. This option is particularly useful
----------------
Is it necessary to document 'MD5 hash' as it is an implementation detail? Perhaps just 'the name hash'


================
Comment at: clang/docs/UsersManual.rst:1689
+   It should be noted that this option cannot guarantee uniqueness and the
+   following is an example where it is not unique:
+
----------------
if the two modules contain symbols with the same private linkage name.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1060
+  const Decl *D = GD.getDecl();
+  if (CGM.getCodeGenOpts().UniqueInternalLinkageNames &&
+      !CGM.getModuleNameHash().empty() &&
----------------
is the first check redundant now?


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

https://reviews.llvm.org/D73307





More information about the cfe-commits mailing list