From 31494cb6c4172e97027aa31ed1f9c78754422111 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 25 Apr 2014 20:19:11 +0000 Subject: [PATCH] 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 --- include/llvm/MC/MCAssembler.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 {