aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-08-03 18:59:35 -0700
committerFangrui Song <i@maskray.me>2025-08-03 18:59:35 -0700
commit2d4ecba957a6cd3b5228e0773ec2d52d8bc5c505 (patch)
tree59fa314e730bc3e5493fcf4b589a603440d22238 /llvm/lib/MC/MachObjectWriter.cpp
parent9a60841dc446e954cd81d33da96e6566d617a810 (diff)
downloadllvm-2d4ecba957a6cd3b5228e0773ec2d52d8bc5c505.zip
llvm-2d4ecba957a6cd3b5228e0773ec2d52d8bc5c505.tar.gz
llvm-2d4ecba957a6cd3b5228e0773ec2d52d8bc5c505.tar.bz2
MCSymbolMachO: 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.
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index bcdc001..eb59e39 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -589,7 +589,7 @@ void MachObjectWriter::computeSymbolTable(
// Build the string table.
for (const MCSymbol &Symbol : Asm.symbols()) {
- if (!cast<MCSymbolMachO>(Symbol).isSymbolLinkerVisible())
+ if (!static_cast<const MCSymbolMachO &>(Symbol).isSymbolLinkerVisible())
continue;
StringTable.add(Symbol.getName());
@@ -603,7 +603,7 @@ void MachObjectWriter::computeSymbolTable(
// important for letting us diff .o files.
for (const MCSymbol &Symbol : Asm.symbols()) {
// Ignore non-linker visible symbols.
- if (!cast<MCSymbolMachO>(Symbol).isSymbolLinkerVisible())
+ if (!static_cast<const MCSymbolMachO &>(Symbol).isSymbolLinkerVisible())
continue;
if (!Symbol.isExternal() && !Symbol.isUndefined())
@@ -629,7 +629,7 @@ void MachObjectWriter::computeSymbolTable(
// Now add the data for local symbols.
for (const MCSymbol &Symbol : Asm.symbols()) {
// Ignore non-linker visible symbols.
- if (!cast<MCSymbolMachO>(Symbol).isSymbolLinkerVisible())
+ if (!static_cast<const MCSymbolMachO &>(Symbol).isSymbolLinkerVisible())
continue;
if (Symbol.isExternal() || Symbol.isUndefined())