[all-commits] [llvm/llvm-project] 78d0e9: Refactor -funique-internal-linakge-names implement...

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Fri Mar 5 13:35:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 78d0e91865f6038adb23ec272c3e1e7e1525057f
      https://github.com/llvm/llvm-project/commit/78d0e91865f6038adb23ec272c3e1e7e1525057f
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M clang/include/clang/AST/Mangle.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/Mangle.cpp
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    A clang/test/CodeGen/unique-internal-linkage-names-dwarf.c
    A clang/test/CodeGen/unique-internal-linkage-names-dwarf.cpp
    M clang/test/CodeGen/unique-internal-linkage-names.cpp

  Log Message:
  -----------
  Refactor -funique-internal-linakge-names implementation.

The option -funique-internal-linkage-names was added in D73307 and D78243 as a
LLVM early pass to insert a unique suffix to internal linkage functions and
vars. The unique suffix was the hash of the module path. However, we found
that this can be done more cleanly in clang early and the fixes that need to
be done later can be completely avoided. The fixes in particular are trying
to modify the DW_AT_linkage_name and finding the right place to insert the
pass.

This patch ressurects the original implementation proposed in D73307 which
was reviewed and then ditched in favor of the pass based approach.

Differential Revision: https://reviews.llvm.org/D96109




More information about the All-commits mailing list