Skip to content

Commit 1bf128e

Browse files
committed
MC/AsmParser: Generalize a check.
llvm-svn: 130515
1 parent dd8061e commit 1bf128e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/MCParser/AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ bool AsmParser::ParseAssignment(StringRef Name, bool allow_redef) {
13481348
// FIXME: Diagnose assignment to protected identifier (e.g., register name).
13491349
if (Sym->isUndefined() && !Sym->isUsed() && !Sym->isVariable())
13501350
; // Allow redefinitions of undefined symbols only used in directives.
1351-
else if (!Sym->isUndefined() && (!Sym->isAbsolute() || !allow_redef))
1351+
else if (!Sym->isUndefined() && (!Sym->isVariable() || !allow_redef))
13521352
return Error(EqualLoc, "redefinition of '" + Name + "'");
13531353
else if (!Sym->isVariable())
13541354
return Error(EqualLoc, "invalid assignment to '" + Name + "'");

0 commit comments

Comments
 (0)