[PATCH] D96109: Refactor implementation of -funique-internal-linkage-names.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 09:56:01 PST 2021


hoy added a comment.

Thanks for moving this feature into the front end. It looks quite clean.



================
Comment at: clang/lib/CodeGen/CGCall.cpp:2093
+      if (this->getFunctionLinkage(Fn) == llvm::GlobalValue::InternalLinkage)
+        FuncAttrs.addAttribute("sample-profile-suffix-elision-policy",
+                               "selected");
----------------
Can a test be made for this?


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:205
+    // that this symbol is of internal linkage type.
+    ModuleNameHash = (Twine(".__uniq.")
+                      + Twine(IntHash.toString(10, false))).str();
----------------
Will this have a unique dwarf debug name automatically generated? I'm wondering if we should make a test for this.


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

https://reviews.llvm.org/D96109



More information about the llvm-commits mailing list