From b6566aee3037f2d6e6837a93e0f766972179ed74 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 5 Jul 2013 10:20:57 +0000 Subject: [PATCH] Simplify code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185689 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 432c39c0ec7..4541f83021d 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -156,7 +156,7 @@ public: /// getDIE - Returns the debug information entry map slot for the /// specified debug variable. - DIE *getDIE(const MDNode *N) { return MDNodeToDieMap.lookup(N); } + DIE *getDIE(const MDNode *N) const { return MDNodeToDieMap.lookup(N); } DIEBlock *getDIEBlock() { return new (DIEValueAllocator) DIEBlock(); @@ -169,12 +169,8 @@ public: /// getDIEEntry - Returns the debug information entry for the specified /// debug variable. - DIEEntry *getDIEEntry(const MDNode *N) { - DenseMap::iterator I = - MDNodeToDIEEntryMap.find(N); - if (I == MDNodeToDIEEntryMap.end()) - return NULL; - return I->second; + DIEEntry *getDIEEntry(const MDNode *N) const { + return MDNodeToDIEEntryMap.lookup(N); } /// insertDIEEntry - Insert debug information entry into the map.