[llvm] r185689 - Simplify code. No functionality change.

Benjamin Kramer benny.kra at googlemail.com
Fri Jul 5 03:20:57 PDT 2013


Author: d0k
Date: Fri Jul  5 05:20:57 2013
New Revision: 185689

URL: http://llvm.org/viewvc/llvm-project?rev=185689&view=rev
Log:
Simplify code. No functionality change.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=185689&r1=185688&r2=185689&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Fri Jul  5 05:20:57 2013
@@ -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<const MDNode *, DIEEntry *>::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.





More information about the llvm-commits mailing list