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/CodeGen/AsmPrinter/CodeViewDebug.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/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 8abeb56..c5d6e40 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1051,10 +1051,10 @@ void CodeViewDebug::switchToDebugSectionForSymbol(const MCSymbol *GVSym) { // comdat key. A section may be comdat because of -ffunction-sections or // because it is comdat in the IR. MCSectionCOFF *GVSec = - GVSym ? dyn_cast<MCSectionCOFF>(&GVSym->getSection()) : nullptr; + GVSym ? static_cast<MCSectionCOFF *>(&GVSym->getSection()) : nullptr; const MCSymbol *KeySym = GVSec ? GVSec->getCOMDATSymbol() : nullptr; - MCSectionCOFF *DebugSec = cast<MCSectionCOFF>( + auto *DebugSec = static_cast<MCSectionCOFF *>( CompilerInfoAsm->getObjFileLowering().getCOFFDebugSymbolsSection()); DebugSec = OS.getContext().getAssociativeCOFFSection(DebugSec, KeySym); |