diff options
author | Fangrui Song <i@maskray.me> | 2025-07-25 22:10:48 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-07-25 22:10:48 -0700 |
commit | dd4ebe6514a9250d10004cdf8876fca7394997d2 (patch) | |
tree | abec46e8e9ea0193f086ddbd20d57df2368929e3 /llvm/lib/MC/MCStreamer.cpp | |
parent | 5f3eea7ef22d2e68ac4882836ffe0b2b79acd569 (diff) | |
download | llvm-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.cpp | 4 |
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 |