@@ -147,7 +147,7 @@ void MCMachOStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
147147
148148void MCMachOStreamer::emitEHSymAttributes (const MCSymbol *Symbol,
149149 MCSymbol *EHSymbol) {
150- auto *Sym = cast< MCSymbolMachO>(Symbol);
150+ auto *Sym = static_cast < const MCSymbolMachO * >(Symbol);
151151 getAssembler ().registerSymbol (*Symbol);
152152 if (Symbol->isExternal ())
153153 emitSymbolAttribute (EHSymbol, MCSA_Global);
@@ -172,7 +172,7 @@ void MCMachOStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
172172 //
173173 // FIXME: Cleanup this code, these bits should be emitted based on semantic
174174 // properties, not on the order of definition, etc.
175- cast <MCSymbolMachO>(Symbol)->clearReferenceType ();
175+ static_cast <MCSymbolMachO * >(Symbol)->clearReferenceType ();
176176}
177177
178178void MCMachOStreamer::emitAssignment (MCSymbol *Symbol, const MCExpr *Value) {
@@ -182,7 +182,7 @@ void MCMachOStreamer::emitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
182182 if (const auto *SymA = Res.getAddSym ()) {
183183 if (!Res.getSubSym () &&
184184 (SymA->getName ().empty () || Res.getConstant () != 0 ))
185- cast <MCSymbolMachO>(Symbol)->setAltEntry ();
185+ static_cast <MCSymbolMachO * >(Symbol)->setAltEntry ();
186186 }
187187 }
188188 MCObjectStreamer::emitAssignment (Symbol, Value);
@@ -256,7 +256,7 @@ void MCMachOStreamer::emitDarwinTargetVariantBuildVersion(
256256
257257bool MCMachOStreamer::emitSymbolAttribute (MCSymbol *Sym,
258258 MCSymbolAttr Attribute) {
259- MCSymbolMachO *Symbol = cast <MCSymbolMachO>(Sym);
259+ auto *Symbol = static_cast <MCSymbolMachO * >(Sym);
260260
261261 // Indirect symbols are handled differently, to match how 'as' handles
262262 // them. This makes writing matching .o files easier.
@@ -367,7 +367,7 @@ bool MCMachOStreamer::emitSymbolAttribute(MCSymbol *Sym,
367367void MCMachOStreamer::emitSymbolDesc (MCSymbol *Symbol, unsigned DescValue) {
368368 // Encode the 'desc' value into the lowest implementation defined bits.
369369 getAssembler ().registerSymbol (*Symbol);
370- cast <MCSymbolMachO>(Symbol)->setDesc (DescValue);
370+ static_cast <MCSymbolMachO * >(Symbol)->setDesc (DescValue);
371371}
372372
373373void MCMachOStreamer::emitCommonSymbol (MCSymbol *Symbol, uint64_t Size,
@@ -430,7 +430,7 @@ void MCMachOStreamer::finishImpl() {
430430 // defining symbols.
431431 DenseMap<const MCFragment *, const MCSymbol *> DefiningSymbolMap;
432432 for (const MCSymbol &Symbol : getAssembler ().symbols ()) {
433- auto &Sym = cast< MCSymbolMachO>(Symbol);
433+ auto &Sym = static_cast < const MCSymbolMachO & >(Symbol);
434434 if (Sym.isSymbolLinkerVisible () && Sym.isInSection () && !Sym.isVariable () &&
435435 !Sym.isAltEntry ()) {
436436 // An atom defining symbol should never be internal to a fragment.
0 commit comments