[llvm] 7a4bc5f - MCSectionMachO: Remove classof
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 26 10:05:34 PDT 2025
Author: Fangrui Song
Date: 2025-07-26T10:05:29-07:00
New Revision: 7a4bc5ff648194260d28b6a617300836cd834bcd
URL: https://github.com/llvm/llvm-project/commit/7a4bc5ff648194260d28b6a617300836cd834bcd
DIFF: https://github.com/llvm/llvm-project/commit/7a4bc5ff648194260d28b6a617300836cd834bcd.diff
LOG: MCSectionMachO: Remove classof
The object file format specific derived classes are used in context like
MCStreamer and MCObjectTargetWriter where the type is statically known.
We don't use isa/dyn_cast and we want to eliminate
MCSection::SectionVariant in the base class.
Added:
Modified:
llvm/include/llvm/MC/MCSectionMachO.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCSectionMachO.h b/llvm/include/llvm/MC/MCSectionMachO.h
index 4312175fd16df..2058bc0d8ca3c 100644
--- a/llvm/include/llvm/MC/MCSectionMachO.h
+++ b/llvm/include/llvm/MC/MCSectionMachO.h
@@ -87,10 +87,6 @@ class LLVM_ABI MCSectionMachO final : public MCSection {
unsigned getLayoutOrder() const { return LayoutOrder; }
void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
-
- static bool classof(const MCSection *S) {
- return S->getVariant() == SV_MachO;
- }
};
} // end namespace llvm
More information about the llvm-commits
mailing list