From: Eric Christopher Date: Thu, 18 Dec 2014 02:08:51 +0000 (+0000) Subject: Reinstate aapcs as the default arm abi. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9795ef075c31d88cae01798e3d24c7c1e921898;p=clang Reinstate aapcs as the default arm abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224490 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 111a383480..77e4e125e6 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -794,10 +794,11 @@ void Clang::AddARMTargetArgs(const ArgList &Args, case llvm::Triple::EABI: ABIName = "aapcs"; break; - // This is also the case for netbsd. - case llvm::Triple::GNU: default: - ABIName = "apcs-gnu"; + if (Triple.getOS() == llvm::Triple::NetBSD) + ABIName = "apcs-gnu"; + else + ABIName = "aapcs"; break; } } diff --git a/test/Driver/arm-abi.c b/test/Driver/arm-abi.c index 937b378c80..812a849110 100644 --- a/test/Driver/arm-abi.c +++ b/test/Driver/arm-abi.c @@ -1,12 +1,12 @@ -// The default ABI is apcs +// The default ABI is aapcs // RUN: %clang -target arm--- %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s +// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target armeb--- %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s +// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target thumb--- %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s +// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target thumbeb--- %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s +// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // MachO targets default to apcs-gnu, except for m-class processors // RUN: %clang -target arm--darwin- -arch armv7s %s -### -o %t.o 2>&1 \