[Target][XCOFF] Correctly halt when mixing AIX or XCOFF with ppc64le
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 8 May 2020 20:40:28 +0000 (16:40 -0400)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 8 May 2020 20:51:34 +0000 (16:51 -0400)
commit601d5bd516ec7b99affb9cd4623ec3c027e63aa3
tree9779d50812f3f52244a8a41af69155012cbc5a79
parentab59aa6c6130e2eb632f79d4163a33c63c58b117
[Target][XCOFF] Correctly halt when mixing AIX or XCOFF with ppc64le

The code to prevent using `PPCXCOFFMCAsmInfo` with little-endian targets
used an incorrect check. Also, there does not appear to be sufficient
earlier checking to prevent failing this check, so the check here is
upgraded to be a `report_fatal_error`.

`PPCAIXAsmPrinter` was also missing a check against use with
little-endian targets. This patch adds such a check in.
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/aix-xcoff-endian-error.ll [new file with mode: 0644]