File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -859,16 +859,12 @@ void USRGenerator::VisitType(QualType T) {
859859 }
860860
861861 // If we have already seen this (non-built-in) type, use a substitution
862- // encoding.
863- llvm::DenseMap< const Type *, unsigned >::iterator Substitution
864- = TypeSubstitutions.find (T.getTypePtr ());
865- if (Substitution != TypeSubstitutions. end () ) {
862+ // encoding. Otherwise, record this as a substitution.
863+ auto [Substitution, Inserted] =
864+ TypeSubstitutions.try_emplace (T.getTypePtr (), TypeSubstitutions. size ());
865+ if (!Inserted ) {
866866 Out << ' S' << Substitution->second << ' _' ;
867867 return ;
868- } else {
869- // Record this as a substitution.
870- unsigned Number = TypeSubstitutions.size ();
871- TypeSubstitutions[T.getTypePtr ()] = Number;
872868 }
873869
874870 if (const PointerType *PT = T->getAs <PointerType>()) {
You can’t perform that action at this time.
0 commit comments