aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2022-03-23 15:40:52 -0700
committerZequan Wu <zequanwu@google.com>2022-03-23 16:11:54 -0700
commit581dc3c729c619fe636325a79279fabb2acdc1ce (patch)
tree98afe38d3c3770f8c91f13de319cbf5833f360e5 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentd3ebefb1541b1489d998f6316f136371d92f7c74 (diff)
downloadllvm-581dc3c729c619fe636325a79279fabb2acdc1ce.zip
llvm-581dc3c729c619fe636325a79279fabb2acdc1ce.tar.gz
llvm-581dc3c729c619fe636325a79279fabb2acdc1ce.tar.bz2
Revert "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
This reverts commit 22570bac694396514fff18dec926558951643fa6.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 3b21e94..0853c7a 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1176,15 +1176,6 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
}
-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;
-}
-
void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer,
Module &M) const {
// Emit the linker options if present.
@@ -2184,7 +2175,8 @@ MCSection *TargetLoweringObjectFileWasm::getStaticCtorSection(
MCSection *TargetLoweringObjectFileWasm::getStaticDtorSection(
unsigned Priority, const MCSymbol *KeySym) const {
- report_fatal_error("@llvm.global_dtors should have been lowered already");
+ llvm_unreachable("@llvm.global_dtors should have been lowered already");
+ return nullptr;
}
//===----------------------------------------------------------------------===//