From 1fc08f5e9ef733ef1ce6f363fecedc2260e78974 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 14 Apr 2012 13:54:10 +0000 Subject: Vendor import of llvm trunk r154661: http://llvm.org/svn/llvm-project/llvm/trunk@r154661 --- lib/MC/MCSymbol.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/MC/MCSymbol.cpp') diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index c2fad16..e013e77 100644 --- a/lib/MC/MCSymbol.cpp +++ b/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(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 { -- cgit v1.1