projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8076b89
)
[DebugInfo] Use DenseMap::lookup (NFC)
author
Kazu Hirata
<kazu@google.com>
Tue, 23 Jan 2024 05:19:11 +0000
(21:19 -0800)
committer
Kazu Hirata
<kazu@google.com>
Tue, 23 Jan 2024 05:19:11 +0000
(21:19 -0800)
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index e6df590b8dd7a0573af6901b1a8d1d26538cc4b0..792df53d304aa7738f8fa483d2fbc8fe45454257 100644
(file)
--- a/
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@
-1353,11
+1353,7
@@
DWARFTypeUnit *DWARFContext::getTypeUnitForHash(uint16_t Version, uint64_t Hash,
DWOUnits.getUnitForIndexEntry(*R));
return nullptr;
}
- const DenseMap<uint64_t, DWARFTypeUnit *> &Map = State->getTypeUnitMap(IsDWO);
- auto Iter = Map.find(Hash);
- if (Iter != Map.end())
- return Iter->second;
- return nullptr;
+ return State->getTypeUnitMap(IsDWO).lookup(Hash);
}
DWARFCompileUnit *DWARFContext::getDWOCompileUnitForHash(uint64_t Hash) {