Skip to content

Commit 888d3cd

Browse files
committed
MCSymbolGOFF: Remove classof
The object file format specific derived classes are used in context where the type is statically known. We don't use isa/dyn_cast and we want to eliminate MCSymbol::Kind in the base class.
1 parent c7bacc9 commit 888d3cd

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

llvm/include/llvm/MC/MCSymbolGOFF.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class MCSymbolGOFF : public MCSymbol {
4747
AssociatedDataArea->RequiresNonZeroLength = true;
4848
}
4949
MCSectionGOFF *getADA() const { return ADA; }
50-
51-
static bool classof(const MCSymbol *S) { return S->isGOFF(); }
5250
};
5351
} // end namespace llvm
5452

llvm/lib/MC/GOFFObjectWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void GOFFWriter::defineSymbols() {
345345
for (const MCSymbol &Sym : Asm.symbols()) {
346346
if (Sym.isTemporary())
347347
continue;
348-
auto &Symbol = cast<MCSymbolGOFF>(Sym);
348+
auto &Symbol = static_cast<const MCSymbolGOFF &>(Sym);
349349
if (Symbol.hasLDAttributes()) {
350350
Symbol.setIndex(++Ordinal);
351351
defineLabel(Symbol);

0 commit comments

Comments
 (0)