aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCWasmStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCWasmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCWasmStreamer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCWasmStreamer.cpp b/llvm/lib/MC/MCWasmStreamer.cpp
index e3ef111..9c8b224 100644
--- a/llvm/lib/MC/MCWasmStreamer.cpp
+++ b/llvm/lib/MC/MCWasmStreamer.cpp
@@ -36,7 +36,7 @@ using namespace llvm;
MCWasmStreamer::~MCWasmStreamer() = default; // anchor.
void MCWasmStreamer::emitLabel(MCSymbol *S, SMLoc Loc) {
- auto *Symbol = cast<MCSymbolWasm>(S);
+ auto *Symbol = static_cast<MCSymbolWasm *>(S);
MCObjectStreamer::emitLabel(Symbol, Loc);
const MCSectionWasm &Section =
@@ -47,7 +47,7 @@ void MCWasmStreamer::emitLabel(MCSymbol *S, SMLoc Loc) {
void MCWasmStreamer::emitLabelAtPos(MCSymbol *S, SMLoc Loc, MCFragment &F,
uint64_t Offset) {
- auto *Symbol = cast<MCSymbolWasm>(S);
+ auto *Symbol = static_cast<MCSymbolWasm *>(S);
MCObjectStreamer::emitLabelAtPos(Symbol, Loc, F, Offset);
const MCSectionWasm &Section =
@@ -69,8 +69,7 @@ void MCWasmStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
bool MCWasmStreamer::emitSymbolAttribute(MCSymbol *S, MCSymbolAttr Attribute) {
assert(Attribute != MCSA_IndirectSymbol && "indirect symbols not supported");
-
- auto *Symbol = cast<MCSymbolWasm>(S);
+ auto *Symbol = static_cast<MCSymbolWasm *>(S);
// Adding a symbol attribute always introduces the symbol; note that an
// important side effect of calling registerSymbol here is to register the
@@ -135,7 +134,7 @@ void MCWasmStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
}
void MCWasmStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {
- cast<MCSymbolWasm>(Symbol)->setSize(Value);
+ static_cast<MCSymbolWasm *>(Symbol)->setSize(Value);
}
void MCWasmStreamer::emitLocalCommonSymbol(MCSymbol *S, uint64_t Size,