mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
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:
parent
cf403861a3
commit
bbdf1e0432
@ -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)");
|
||||
|
7
test/CodeGen/AArch64/dont-take-over-the-world.ll
Normal file
7
test/CodeGen/AArch64/dont-take-over-the-world.ll
Normal 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.
|
Loading…
x
Reference in New Issue
Block a user