[llvm] a8cffb8 - Remove unused MCObjectFileInfo::SupportsWeakOmittedEHFrame
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 29 17:43:32 PST 2025
Author: Fangrui Song
Date: 2025-11-29T17:43:26-08:00
New Revision: a8cffb82991f76c3a004820d94dd4e0853bce1db
URL: https://github.com/llvm/llvm-project/commit/a8cffb82991f76c3a004820d94dd4e0853bce1db
DIFF: https://github.com/llvm/llvm-project/commit/a8cffb82991f76c3a004820d94dd4e0853bce1db.diff
LOG: Remove unused MCObjectFileInfo::SupportsWeakOmittedEHFrame
The code is related to pre-AsmPrinter legacy code (see
9cb0e94dc79657144d639c722619e1e4fc19040e in 2008). The only caller has
been removed by bb237c72a69e6294258874a40aaaf14ad2747710 in 2011.
Added:
Modified:
llvm/include/llvm/MC/MCObjectFileInfo.h
llvm/lib/MC/MCObjectFileInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCObjectFileInfo.h b/llvm/include/llvm/MC/MCObjectFileInfo.h
index ed7f462c3c598..51b7d73d46036 100644
--- a/llvm/include/llvm/MC/MCObjectFileInfo.h
+++ b/llvm/include/llvm/MC/MCObjectFileInfo.h
@@ -29,10 +29,6 @@ class MCSection;
class LLVM_ABI MCObjectFileInfo {
protected:
- /// True if target object file supports a weak_definition of constant 0 for an
- /// omitted EH frame.
- bool SupportsWeakOmittedEHFrame = false;
-
/// True if the target object file supports emitting a compact unwind section
/// without an associated EH frame section.
bool SupportsCompactUnwindWithoutEHFrame = false;
@@ -260,9 +256,6 @@ class LLVM_ABI MCObjectFileInfo {
virtual ~MCObjectFileInfo();
MCContext &getContext() const { return *Ctx; }
- bool getSupportsWeakOmittedEHFrame() const {
- return SupportsWeakOmittedEHFrame;
- }
bool getSupportsCompactUnwindWithoutEHFrame() const {
return SupportsCompactUnwindWithoutEHFrame;
}
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index b2f500083f5d8..5afe00eee2242 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -61,9 +61,6 @@ static bool useCompactUnwind(const Triple &T) {
}
void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) {
- // MachO
- SupportsWeakOmittedEHFrame = false;
-
EHFrameSection = Ctx->getMachOSection(
"__TEXT", "__eh_frame",
MachO::S_COALESCED | MachO::S_ATTR_NO_TOC |
@@ -1090,7 +1087,6 @@ void MCObjectFileInfo::initMCObjectFileInfo(MCContext &MCCtx, bool PIC,
Ctx = &MCCtx;
// Common.
- SupportsWeakOmittedEHFrame = true;
SupportsCompactUnwindWithoutEHFrame = false;
OmitDwarfIfHaveCompactUnwind = false;
More information about the llvm-commits
mailing list