aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-07-25 22:10:48 -0700
committerFangrui Song <i@maskray.me>2025-07-25 22:10:48 -0700
commitdd4ebe6514a9250d10004cdf8876fca7394997d2 (patch)
treeabec46e8e9ea0193f086ddbd20d57df2368929e3 /llvm/lib/MC/MCStreamer.cpp
parent5f3eea7ef22d2e68ac4882836ffe0b2b79acd569 (diff)
downloadllvm-dd4ebe6514a9250d10004cdf8876fca7394997d2.zip
llvm-dd4ebe6514a9250d10004cdf8876fca7394997d2.tar.gz
llvm-dd4ebe6514a9250d10004cdf8876fca7394997d2.tar.bz2
MCSectionCOFF: 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.
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index e14a32f5..db3e9b3 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -838,8 +838,8 @@ static MCSection *getWinCFISection(MCContext &Context, unsigned *NextWinCFIID,
if (TextSec == Context.getObjectFileInfo()->getTextSection())
return MainCFISec;
- const auto *TextSecCOFF = cast<MCSectionCOFF>(TextSec);
- auto *MainCFISecCOFF = cast<MCSectionCOFF>(MainCFISec);
+ const auto *TextSecCOFF = static_cast<const MCSectionCOFF *>(TextSec);
+ auto *MainCFISecCOFF = static_cast<MCSectionCOFF *>(MainCFISec);
unsigned UniqueID = TextSecCOFF->getOrAssignWinCFISectionID(NextWinCFIID);
// If this section is COMDAT, this unwind section should be COMDAT associative