diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index 44842213280..bbd34f15740 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/lib/MC/MCSymbol.cpp @@ -40,7 +40,11 @@ void *MCSymbol::operator new(size_t s, const StringMapEntry<bool> *Name,  void MCSymbol::setVariableValue(const MCExpr *Value) {    assert(!IsUsed && "Cannot set a variable that has already been used.");    assert(Value && "Invalid variable value!"); +  assert((SymbolContents == SymContentsUnset || +          SymbolContents == SymContentsVariable) && +         "Cannot give common/offset symbol a variable value");    this->Value = Value; +  SymbolContents = SymContentsVariable;    SectionOrFragment = nullptr;  }  | 

