[llvm-commits] [llvm] r130515 - /llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Daniel Dunbar
daniel at zuster.org
Fri Apr 29 10:53:12 PDT 2011
Author: ddunbar
Date: Fri Apr 29 12:53:11 2011
New Revision: 130515
URL: http://llvm.org/viewvc/llvm-project?rev=130515&view=rev
Log:
MC/AsmParser: Generalize a check.
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=130515&r1=130514&r2=130515&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Fri Apr 29 12:53:11 2011
@@ -1348,7 +1348,7 @@
// 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 + "'");
More information about the llvm-commits
mailing list