diff options
author | Fangrui Song <i@maskray.me> | 2025-08-03 16:05:34 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-08-03 16:05:35 -0700 |
commit | b51ff2705fe15a214ba234dae221c39b105fa57c (patch) | |
tree | e8dc459d165d7cddcd3180505af1f14933d7b7a9 /llvm/lib/MC/MCELFStreamer.cpp | |
parent | e640ca8b9adc390325e2c0406b0032dd24563c75 (diff) | |
download | llvm-b51ff2705fe15a214ba234dae221c39b105fa57c.zip llvm-b51ff2705fe15a214ba234dae221c39b105fa57c.tar.gz llvm-b51ff2705fe15a214ba234dae221c39b105fa57c.tar.bz2 |
MCSymbolELF: Migrate away from 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/MCELFStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCELFStreamer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index 5ffe17c..275e76e 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -272,8 +272,8 @@ void MCELFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size, " redeclared as different type"); } - cast<MCSymbolELF>(Symbol) - ->setSize(MCConstantExpr::create(Size, getContext())); + static_cast<MCSymbolELF *>(Symbol)->setSize( + MCConstantExpr::create(Size, getContext())); } void MCELFStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) { |