[SystemZ][z/OS] vasprintf fix libc++

The aim is to use the correct vasprintf implementation for z/OS libc++, where a copy of va_list ap is needed. In particular, it avoids the potential that the initial internal call to vsnprintf will modify ap and the subsequent call to vsnprintf will use that modified ap.

Differential Revision: https://reviews.llvm.org/D97473

GitOrigin-RevId: f6af5efcec4171080c036ad55a2b4db9fc5c37fa
2 files changed