File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -10527,12 +10527,11 @@ void ASTImporter::CompleteDecl (Decl *D) {
10527
10527
}
10528
10528
10529
10529
Decl *ASTImporter::MapImported (Decl *From, Decl *To) {
10530
- llvm::DenseMap<Decl *, Decl *>::iterator Pos = ImportedDecls.find (From);
10531
- assert ((Pos == ImportedDecls. end () || Pos->second == To) &&
10532
- " Try to import an already imported Decl" );
10533
- if (Pos != ImportedDecls. end () )
10530
+ auto [Pos, Inserted] = ImportedDecls.try_emplace (From, To );
10531
+ assert ((Inserted || Pos->second == To) &&
10532
+ " Try to import an already imported Decl" );
10533
+ if (!Inserted )
10534
10534
return Pos->second ;
10535
- ImportedDecls[From] = To;
10536
10535
// This mapping should be maintained only in this function. Therefore do not
10537
10536
// check for additional consistency.
10538
10537
ImportedFromDecls[To] = From;
You can’t perform that action at this time.
0 commit comments