mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
MC: Label definitions are permitted after .set directives
.set directives may be overridden by other .set directives as well as label definitions. This fixes PR22019. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1298,6 +1298,9 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
|
||||
Sym = getContext().GetOrCreateSymbol(IDVal);
|
||||
} else
|
||||
Sym = Ctx.CreateDirectionalLocalSymbol(LocalLabelVal);
|
||||
|
||||
Sym->redefineIfPossible();
|
||||
|
||||
if (!Sym->isUndefined() || Sym->isVariable())
|
||||
return Error(IDLoc, "invalid symbol redefinition");
|
||||
|
||||
@@ -2217,6 +2220,8 @@ bool AsmParser::parseAssignment(StringRef Name, bool allow_redef,
|
||||
} else
|
||||
Sym = getContext().GetOrCreateSymbol(Name);
|
||||
|
||||
Sym->setRedefinable(allow_redef);
|
||||
|
||||
// Do the assignment.
|
||||
Out.EmitAssignment(Sym, Value);
|
||||
if (NoDeadStrip)
|
||||
|
Reference in New Issue
Block a user