summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-07-05 10:20:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-07-05 10:20:57 +0000
commitb6566aee3037f2d6e6837a93e0f766972179ed74 (patch)
tree21ee54546f5f72160a90c00bb7df5afd0924d869
parent00d9fe2de7f0b8f9d1ea19ae30cc78b1a1e1fb92 (diff)
downloadllvm-b6566aee3037f2d6e6837a93e0f766972179ed74.tar.gz
llvm-b6566aee3037f2d6e6837a93e0f766972179ed74.tar.bz2
llvm-b6566aee3037f2d6e6837a93e0f766972179ed74.tar.xz
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185689 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 432c39c0ec..4541f83021 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<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.