MCAssembler: Simplify implementation of const variants of getSymbolData by calling one implementation from the other.

Code review feedback by Rafael Espindola on r207124.

llvm-svn: 207266
This commit is contained in:
David Blaikie 2014-04-25 20:19:11 +00:00
parent c83e70bec0
commit 7dd77bc4d4

View File

@ -1208,9 +1208,8 @@ public:
}
MCSymbolData &getSymbolData(const MCSymbol &Symbol) {
MCSymbolData *Entry = SymbolMap.lookup(&Symbol);
assert(Entry && "Missing symbol data!");
return *Entry;
return const_cast<MCSymbolData &>(
static_cast<const MCAssembler &>(*this).getSymbolData(Symbol));
}
const MCSymbolData &getSymbolData(const MCSymbol &Symbol) const {