mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
MC/AsmParser: Generalize a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130515 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c003229ddc
commit
6db7fe8736
@ -1348,7 +1348,7 @@ bool AsmParser::ParseAssignment(StringRef Name, bool allow_redef) {
|
||||
// FIXME: Diagnose assignment to protected identifier (e.g., register name).
|
||||
if (Sym->isUndefined() && !Sym->isUsed() && !Sym->isVariable())
|
||||
; // Allow redefinitions of undefined symbols only used in directives.
|
||||
else if (!Sym->isUndefined() && (!Sym->isAbsolute() || !allow_redef))
|
||||
else if (!Sym->isUndefined() && (!Sym->isVariable() || !allow_redef))
|
||||
return Error(EqualLoc, "redefinition of '" + Name + "'");
|
||||
else if (!Sym->isVariable())
|
||||
return Error(EqualLoc, "invalid assignment to '" + Name + "'");
|
||||
|
Loading…
Reference in New Issue
Block a user