Skip to content

Commit 7efb70f

Browse files
committed
MCSymbolELF: 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 5d5ce06 commit 7efb70f

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

llvm/include/llvm/MC/MCSymbol.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ class MCSymbol {
281281
/// Mark the symbol as undefined.
282282
void setUndefined() { Fragment = nullptr; }
283283

284-
bool isELF() const { return Kind == SymbolKindELF; }
285-
286284
bool isCOFF() const { return Kind == SymbolKindCOFF; }
287285

288286
bool isGOFF() const { return Kind == SymbolKindGOFF; }

llvm/include/llvm/MC/MCSymbolELF.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class MCSymbolELF : public MCSymbol {
4848
void setMemtag(bool Tagged);
4949
bool isMemtag() const;
5050

51-
static bool classof(const MCSymbol *S) { return S->isELF(); }
52-
5351
private:
5452
void setIsBindingSet() const;
5553
};

llvm/lib/Target/Mips/MipsAsmPrinter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,7 @@ void MipsAsmPrinter::EmitFPCallStub(
10521052
// __call_stub_fp_xxxx:
10531053
//
10541054
std::string x = "__call_stub_fp_" + std::string(Symbol);
1055-
MCSymbolELF *Stub =
1056-
cast<MCSymbolELF>(OutContext.getOrCreateSymbol(StringRef(x)));
1055+
MCSymbol *Stub = OutContext.getOrCreateSymbol(StringRef(x));
10571056
TS.emitDirectiveEnt(*Stub);
10581057
MCSymbol *MType =
10591058
OutContext.getOrCreateSymbol("__call_stub_fp_" + Twine(Symbol));

0 commit comments

Comments
 (0)