diff options
Diffstat (limited to 'contrib/llvm/lib/MC/MCSymbol.cpp')
-rw-r--r-- | contrib/llvm/lib/MC/MCSymbol.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/contrib/llvm/lib/MC/MCSymbol.cpp b/contrib/llvm/lib/MC/MCSymbol.cpp index c2fad16..e013e77 100644 --- a/contrib/llvm/lib/MC/MCSymbol.cpp +++ b/contrib/llvm/lib/MC/MCSymbol.cpp @@ -54,17 +54,14 @@ 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. const MCSection *Section = Value->FindAssociatedSection(); - if (Section) { + if (Section) setSection(*Section); - } else { + else setUndefined(); - } } void MCSymbol::print(raw_ostream &OS) const { |