From: David Blaikie Date: Fri, 25 Apr 2014 20:19:11 +0000 (+0000) Subject: MCAssembler: Simplify implementation of const variants of getSymbolData by calling... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=31494cb6c4172e97027aa31ed1f9c78754422111;p=oota-llvm.git MCAssembler: Simplify implementation of const variants of getSymbolData by calling one implementation from the other. Code review feedback by Rafael Espindola on r207124. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207266 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 9c7733c83bf..e71775a8c1b 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -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( + static_cast(*this).getSymbolData(Symbol)); } const MCSymbolData &getSymbolData(const MCSymbol &Symbol) const {