Skip to content

Commit a1301cb

Browse files
[Bitcode] Avoid repeated hash lookups (NFC)
1 parent 98542a3 commit a1301cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Bitcode/Reader/MetadataLoader.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,10 @@ class MetadataLoader::MetadataLoaderImpl {
539539
if (!Visited.insert(S).second)
540540
break;
541541
}
542-
ParentSubprogram[InitialScope] = llvm::dyn_cast_or_null<DISubprogram>(S);
543542

544-
return ParentSubprogram[InitialScope];
543+
auto &PS = ParentSubprogram[InitialScope];
544+
PS = llvm::dyn_cast_or_null<DISubprogram>(S);
545+
return PS;
545546
}
546547

547548
/// Move local imports from DICompileUnit's 'imports' field to

0 commit comments

Comments
 (0)