MC/AsmParser: Generalize a check.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 29 Apr 2011 17:53:11 +0000 (17:53 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 29 Apr 2011 17:53:11 +0000 (17:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130515 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmParser.cpp

index d7ac5a70edc0a02731ceee3f131bcd9275481167..d8fd27d873f6d6abe7e22df5d3e3ab9fb2cd6127 100644 (file)
@@ -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 + "'");