@@ -1480,7 +1480,7 @@ bool MasmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc,
14801480 auto VarIt = Variables.find (SymbolName.lower ());
14811481 if (VarIt != Variables.end ())
14821482 SymbolName = VarIt->second .Name ;
1483- Sym = getContext ().parseSymbol (SymbolName);
1483+ Sym = getContext ().getOrCreateSymbol (SymbolName);
14841484 }
14851485
14861486 // If this is an absolute variable reference, substitute it now to preserve
@@ -1965,7 +1965,7 @@ bool MasmParser::parseStatement(ParseStatementInfo &Info,
19651965 if (IDVal == " @@" ) {
19661966 Sym = Ctx.createDirectionalLocalSymbol (0 );
19671967 } else {
1968- Sym = getContext ().parseSymbol (IDVal);
1968+ Sym = getContext ().getOrCreateSymbol (IDVal);
19691969 }
19701970
19711971 // End of Labels should be treated as end of line for lexing
@@ -3009,7 +3009,8 @@ bool MasmParser::parseDirectiveEquate(StringRef IDVal, StringRef Name,
30093009 return false ;
30103010 }
30113011
3012- auto *Sym = getContext ().parseSymbol (Var.Name );
3012+ MCSymbol *Sym = getContext ().getOrCreateSymbol (Var.Name );
3013+
30133014 const MCConstantExpr *PrevValue =
30143015 Sym->isVariable ()
30153016 ? dyn_cast_or_null<MCConstantExpr>(Sym->getVariableValue ())
@@ -3317,7 +3318,7 @@ bool MasmParser::parseDirectiveNamedValue(StringRef TypeName, unsigned Size,
33173318 StringRef Name, SMLoc NameLoc) {
33183319 if (StructInProgress.empty ()) {
33193320 // Initialize named data value.
3320- MCSymbol *Sym = getContext ().parseSymbol (Name);
3321+ MCSymbol *Sym = getContext ().getOrCreateSymbol (Name);
33213322 getStreamer ().emitLabel (Sym);
33223323 unsigned Count;
33233324 if (emitIntegralValues (Size, &Count))
@@ -3508,7 +3509,7 @@ bool MasmParser::parseDirectiveNamedRealValue(StringRef TypeName,
35083509 SMLoc NameLoc) {
35093510 if (StructInProgress.empty ()) {
35103511 // Initialize named data value.
3511- MCSymbol *Sym = getContext ().parseSymbol (Name);
3512+ MCSymbol *Sym = getContext ().getOrCreateSymbol (Name);
35123513 getStreamer ().emitLabel (Sym);
35133514 unsigned Count;
35143515 if (emitRealValues (Semantics, &Count))
@@ -4002,7 +4003,7 @@ bool MasmParser::parseDirectiveNamedStructValue(const StructInfo &Structure,
40024003 SMLoc DirLoc, StringRef Name) {
40034004 if (StructInProgress.empty ()) {
40044005 // Initialize named data value.
4005- MCSymbol *Sym = getContext ().parseSymbol (Name);
4006+ MCSymbol *Sym = getContext ().getOrCreateSymbol (Name);
40064007 getStreamer ().emitLabel (Sym);
40074008 unsigned Count;
40084009 if (emitStructValues (Structure, &Count))
0 commit comments