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) {
859
859
}
860
860
861
861
// 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 ) {
866
866
Out << ' S' << Substitution->second << ' _' ;
867
867
return ;
868
- } else {
869
- // Record this as a substitution.
870
- unsigned Number = TypeSubstitutions.size ();
871
- TypeSubstitutions[T.getTypePtr ()] = Number;
872
868
}
873
869
874
870
if (const PointerType *PT = T->getAs <PointerType>()) {
You can’t perform that action at this time.
0 commit comments