Skip to content

Commit 3780aba

Browse files
authored
Merge pull request #82054 from ahoppen/6.2/dont-verify-mangle
[6.2][Indexing] Don't verify mangling of USRs
2 parents 302c563 + 558644f commit 3780aba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ ASTMangler::mangleAnyDecl(const ValueDecl *Decl,
10061006

10071007
// We have a custom prefix, so finalize() won't verify for us. If we're not
10081008
// in invalid code (coming from an IDE caller) verify manually.
1009-
if (!Decl->isInvalid())
1009+
if (CONDITIONAL_ASSERT_enabled() && !prefix && !Decl->isInvalid())
10101010
verify(Storage.str(), Flavor);
10111011
return finalize();
10121012
}
@@ -1026,7 +1026,7 @@ std::string ASTMangler::mangleAccessorEntityAsUSR(AccessorKind kind,
10261026
appendAccessorEntity(getCodeForAccessorKind(kind), decl, isStatic);
10271027
// We have a custom prefix, so finalize() won't verify for us. If we're not
10281028
// in invalid code (coming from an IDE caller) verify manually.
1029-
if (!decl->isInvalid())
1029+
if (CONDITIONAL_ASSERT_enabled() && !decl->isInvalid())
10301030
verify(Storage.str().drop_front(USRPrefix.size()), Flavor);
10311031
return finalize();
10321032
}

0 commit comments

Comments
 (0)