This patch fixes PR 30440 by initializing CXXNameMangler's FunctionTypeDepth in the two constructors added in r274222 (The commit that caused this regression).
LGTM, added Richard in case he has something to add.
I think we need to fix this regression.