Index: lib/AST/ItaniumMangle.cpp =================================================================== --- lib/AST/ItaniumMangle.cpp +++ lib/AST/ItaniumMangle.cpp @@ -4300,7 +4300,9 @@ // Compute 'L'. // parmDepth does not include the declaring function prototype. // FunctionTypeDepth does account for that. - assert(parmDepth < FunctionTypeDepth.getDepth()); + assert(parmDepth < FunctionTypeDepth.getDepth() || + (parmDepth == FunctionTypeDepth.getDepth() && + !FunctionTypeDepth.isInResultType())); unsigned nestingDepth = FunctionTypeDepth.getDepth() - parmDepth; if (FunctionTypeDepth.isInResultType()) nestingDepth--;