[PATCH] D125095: [Clang][AIX] Add .ref in frontend for AIX XCOFF to support `-bcdtors:csect` linker option

Ting Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 07:39:58 PDT 2022


tingwang created this revision.
tingwang added reviewers: jsji, nemanjai, shchenz, hubert.reinterpretcast, PowerPC.
tingwang added projects: LLVM, clang.
Herald added a project: All.
tingwang requested review of this revision.
Herald added a subscriber: cfe-commits.

This is the frontend part of .ref enablement. It works with D122198 <https://reviews.llvm.org/D122198>, and implements below items:

(1) variable to init/term functions (required to add functions to _cdtors array if the variable is included in linker output)
(2) dtor function to term function (required to correctly handle atexit/unatexit registration/unregistration)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125095

Files:
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/CodeGen/CGDeclCXX.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/test/CodeGen/PowerPC/aix-init-ref-null.cpp
  clang/test/CodeGen/PowerPC/aix-ref-static-var.cpp
  clang/test/CodeGen/PowerPC/aix-ref-tls_init.cpp
  clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
  clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp
  clang/test/CodeGenCXX/aix-static-init.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125095.427638.patch
Type: text/x-patch
Size: 22053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220506/79157f2e/attachment-0001.bin>


More information about the cfe-commits mailing list