Skip to content

Commit 1e81056

Browse files
[Coroutines] Avoid repeated hash lookups (NFC) (#111617)
1 parent 267e852 commit 1e81056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ static void buildFrameDebugInfo(Function &F, coro::Shape &Shape,
797797
AlignInBits = OffsetCache[Index].first * 8;
798798
OffsetInBits = OffsetCache[Index].second * 8;
799799

800-
if (NameCache.contains(Index)) {
801-
Name = NameCache[Index].str();
800+
if (auto It = NameCache.find(Index); It != NameCache.end()) {
801+
Name = It->second.str();
802802
DITy = TyCache[Index];
803803
} else {
804804
DITy = solveDIType(DBuilder, Ty, Layout, FrameDITy, LineNum, DITypeCache);

0 commit comments

Comments
 (0)