msabi: Fix exponential mangling time for even more contrived inputs
This is a follow-up to r362293 which fixed exponential time needed
for mangling certain templates. This fixes the same issue if that
template pattern happens in template arguments > 10: The first
ten template arguments can use back references, and r362293 added
caching for back references. For latter arguments, we have to add
a cache for the mangling itself instead.
Fixes PR42091 even more.
Differential Revision: https://reviews.llvm.org/D62780
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362560
91177308-0d34-0410-b5e6-
96231b3b80d8