AArch64: stop trying to take control of all UnknownArch triples.

This short-circuited our error reporting for incorrectly specified
target triples (you'd get AArch64 code instead).

Should fix PR20567.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2014-08-08 08:27:44 +00:00
parent cf403861a3
commit bbdf1e0432
2 changed files with 10 additions and 2 deletions

View File

@ -20,8 +20,9 @@ Target TheARM64Target;
extern "C" void LLVMInitializeAArch64TargetInfo() {
// Now register the "arm64" name for use with "-march". We don't want it to
// take possession of the Triple::aarch64 tag though.
RegisterTarget<Triple::UnknownArch, /*HasJIT=*/true> X(
TheARM64Target, "arm64", "ARM64 (little endian)");
TargetRegistry::RegisterTarget(TheARM64Target, "arm64",
"ARM64 (little endian)",
[](Triple::ArchType) { return false; }, true);
RegisterTarget<Triple::aarch64, /*HasJIT=*/true> Z(
TheAArch64leTarget, "aarch64", "AArch64 (little endian)");

View File

@ -0,0 +1,7 @@
; RUN: not llc -mtriple=x86-64 2>&1 | FileCheck %s
; To support "arm64" as a -march option, we need to register a second AArch64
; target, but we have to be careful how we do that so that it doesn't become the
; target of last resort when the specified triple is completely wrong.
; CHECK: unable to get target for 'x86-64', see --version and --triple.