The Itanium mangler constructors use both NSDMI and explicit member construction for default values. This is confusing.
*) Use NSDMIs wherever possible
*) Use forwarding ctor for the nesting case with an llvm::raw_null_ostream (and explicitly set NullOut flag in that ctor).
*) Copy the ModuleSubstitutions. This is a bug with no effect in the current mangling, but not in the newer mangling.
@ChuanquXi, the bug is possibly the cause of the crash you're encountering in the update module mangling patch. It would be good to be able to put a testcase in for that.