Also replace aarch64-none-linux-gnu (none can indicate an OS as well) with aarch64
Rather than sending a name directly to the stream, use printName to preserve any PrintingPolicy. This ensures that names are properly affected by path remapping. Fixes: https://github.com/llvm/llvm-project/issues/62192 Differential Revision: https://reviews.llvm.org/D149272