Fix several instances of macros being defined multiple times in several targets. Most of these are just simple duplication in a TargetInfo or OSTargetInfo of things already defined in InitializePredefinedMacros or InitializeStandardPredefinedMacros, but there are a few that aren't:
- AArch64 defines a couple of feature macros for armv8.1a that are handled generically by getTargetDefines.
- CSKY needs to take care when CPUName and ArchName are the same.
- Many os/target combinations result in ELF being defined twice. Instead define ELF just once in InitPreprocessor based on the Triple, which already knows what the object format is based on os and target.
These changes shouldn't change the final result of which macros are defined, with the exception of the changes to ELF where if you explicitly specify the object type in the triple then this affects if ELF is defined, e.g. --target=i686-windows-elf results in it being defined where it wasn't before, but this is more accurate as an ELF file is in fact generated.
Hmm, is this correct?
__ARM_FEATURE_ATOMICS is defined in one other place, but it's conditionally defined: https://github.com/llvm/llvm-project/blob/11926e6149d2a68ecb0652b248efe6890c163846/clang/lib/Basic/Targets/AArch64.cpp#L475
and __ARM_FEATURE_CRC32 is defined in two places, both conditional: https://github.com/llvm/llvm-project/blob/11926e6149d2a68ecb0652b248efe6890c163846/clang/lib/Basic/Targets/AArch64.cpp#L422 and https://github.com/llvm/llvm-project/blob/11926e6149d2a68ecb0652b248efe6890c163846/clang/lib/Basic/Targets/ARM.cpp#L747