forked from OSchip/llvm-project
ARM: *-*-darwin-eabi triples should use AAPCS.
llvm-svn: 191900
This commit is contained in:
parent
83ebd022d7
commit
e66c946ee4
|
@ -765,7 +765,8 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
|
|||
} else if (Triple.isOSDarwin()) {
|
||||
// The backend is hardwired to assume AAPCS for M-class processors, ensure
|
||||
// the frontend matches that.
|
||||
if (StringRef(CPUName).startswith("cortex-m")) {
|
||||
if (Triple.getEnvironment() == llvm::Triple::EABI ||
|
||||
StringRef(CPUName).startswith("cortex-m")) {
|
||||
ABIName = "aapcs";
|
||||
} else {
|
||||
ABIName = "apcs-gnu";
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
|
||||
// RUN: %clang -arch armv7 -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
|
||||
// RUN: %clang -arch armv7s -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
|
||||
// RUN: %clang -arch armv7s -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
|
||||
|
||||
// CHECK-AAPCS: "-target-abi" "aapcs"
|
||||
// CHECK-APCS: "-target-abi" "apcs-gnu"
|
Loading…
Reference in New Issue