In post-commit feedback on D104830 Jessica Clarke pointed out that
unconditionally adding __va_list to the std namespace caused namespace
debug info to be emitted in C, which is not only inappropriate but
turned out to confuse the dtrace tool. Therefore, move __va_list to theback
top level unconditionallyto std only in C++ so that the correct debug info is generated.
To avoid breaking name mangling for __va_list, teach the Itanium name
mangler to mangle it as if it were in the std namespace when targetingWe
ARM architectures. This logic is not needed for the Microsoft namealso considered moving __va_list to the top level unconditionally
mangler because Microsoft platforms define va_list as a typedef ofbut this would contradict the specification and be visible to AST
char *matchers and such, so make it conditional on the language mode.
It was also noted that 32-bit ARM has the same issue as was fixedTo avoid breaking name mangling for __va_list, teach the Itanium
name mangler to always mangle it as if it were in the std namespace
when targeting ARM architectures. This logic is not needed for the
Microsoft name mangler because Microsoft platforms define va_list as
for 64-bit ARM in D104830, so do the same for that architecturea typedef of char *.
Depends on D116773