The MangleContext API from ASTContext is used incorrectly in the handling of the FUNCDNAME resulting in inconsistencies between the results of FUNCDNAME and the mangled function names in CodeGen.
This fix simplifies the ASTContext API so that it owns the mangling context what removes the inconsistencies.
Please refactor all the other code that uses createMangleContext to use getMangleContext, and then make createMangleContext private.