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) {
1052710527}
1052810528
1052910529Decl *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 )
1053410534 return Pos->second ;
10535- ImportedDecls[From] = To;
1053610535 // This mapping should be maintained only in this function. Therefore do not
1053710536 // check for additional consistency.
1053810537 ImportedFromDecls[To] = From;
You can’t perform that action at this time.
0 commit comments