diff options
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 41ad1642d28..ab5ddaf4ac0 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1629,6 +1629,8 @@ bool AsmParser::ParseAssignment(StringRef Name, bool allow_redef) {        return Error(EqualLoc, "Recursive use of '" + Name + "'");      else if (Sym->isUndefined() && !Sym->isUsed() && !Sym->isVariable())        ; // Allow redefinitions of undefined symbols only used in directives. +    else if (Sym->isVariable() && !Sym->isUsed() && allow_redef) +      ; // Allow redefinitions of variables that haven't yet been used.      else if (!Sym->isUndefined() && (!Sym->isVariable() || !allow_redef))        return Error(EqualLoc, "redefinition of '" + Name + "'");      else if (!Sym->isVariable()) diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index 87b58d7a533..e013e77f58a 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/lib/MC/MCSymbol.cpp @@ -54,8 +54,6 @@ const MCSymbol &MCSymbol::AliasedSymbol() const {  void MCSymbol::setVariableValue(const MCExpr *Value) {    assert(!IsUsed && "Cannot set a variable that has already been used.");    assert(Value && "Invalid variable value!"); -  assert((isUndefined() || (isAbsolute() && isa<MCConstantExpr>(Value))) && -         "Invalid redefinition!");    this->Value = Value;    // Variables should always be marked as in the same "section" as the value. | 

