[PATCH] D45578: Add a command line option 'fregister_dtor_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 10:12:24 PDT 2018
ahatanak created this revision.
ahatanak added reviewers: arphaman, steven_wu, rjmccall.
The command line option makes IRGen register destructor functions
annotated with __attribute__((destructor)) calling __cxa_atexit in a
synthesized constructor function instead of emitting references to
the destructor functions in a special function (__mod_term_funcs on
Darwin).
The primary reason for adding this option is that we are planning to
deprecate __mod_term_funcs section on Darwin in the future. This feature
is enabled by default on Darwin and can be disabled using command line
option 'fno_register_dtor_with_atexit'.
rdar://problem/33887655
Repository:
rC Clang
https://reviews.llvm.org/D45578
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/constructor-attribute.c
test/Driver/cxa-atexit.cpp
test/Driver/rewrite-legacy-objc.m
test/Driver/rewrite-objc.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45578.142207.patch
Type: text/x-patch
Size: 17350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180412/f2e63966/attachment-0001.bin>
More information about the cfe-commits
mailing list