diff options
author | Julian Lettner <julian.lettner@apple.com> | 2023-03-09 11:32:17 -0800 |
---|---|---|
committer | Julian Lettner <julian.lettner@apple.com> | 2023-03-14 14:18:11 -0700 |
commit | e6a789ef9bb28222c91816a2cf00cfd6f706efd4 (patch) | |
tree | a01b2b0b3d37ad7693bb3d3124926ce454a9b720 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | e48ae0dbd80d58ce8eded9e55f0b1262d52517af (diff) | |
download | llvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.zip llvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.tar.gz llvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.tar.bz2 |
Remove -lower-global-dtors-via-cxa-atexit flag
Remove the `-lower-global-dtors-via-cxa-atexit` escape hatch introduced
in D121736 [1], which switched the default lowering of global
destructors on MachO to use `__cxa_atexit()` to avoid emitting
deprecated `__mod_term_func` sections.
I added this flag as an escape hatch in case the switch causes any
problems. We didn't discover any problems so now we can remove it.
[1] https://reviews.llvm.org/D121736
rdar://90277838
Differential Revision: https://reviews.llvm.org/D145715
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 5f9e9ea..e2fbe02 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1202,11 +1202,7 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, MCSection *TargetLoweringObjectFileMachO::getStaticDtorSection( unsigned Priority, const MCSymbol *KeySym) const { - // TODO(yln): Remove -lower-global-dtors-via-cxa-atexit fallback flag - // (LowerGlobalDtorsViaCxaAtExit) and always issue a fatal error here. - if (TM->Options.LowerGlobalDtorsViaCxaAtExit) - report_fatal_error("@llvm.global_dtors should have been lowered already"); - return StaticDtorSection; + report_fatal_error("@llvm.global_dtors should have been lowered already"); } void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer, |