diff options
author | Bernard Ogden <bogden@arm.com> | 2013-12-12 13:27:11 +0000 |
---|---|---|
committer | Bernard Ogden <bogden@arm.com> | 2013-12-12 13:27:11 +0000 |
commit | 5316b7514b770d821279e70555db606cd6a0db51 (patch) | |
tree | 4ce349a1daecc2b9120bc3d76f9bb9f706c5a87f /test/Driver/arm-arch-darwin.c | |
parent | e708539099f2f32feba052486cc51ae36a58b841 (diff) | |
download | clang-5316b7514b770d821279e70555db606cd6a0db51.tar.gz |
Refactor duplicate functions
getARMCPU and getLLVMArchSuffixForARM existed as very similar functions
in both ToolChain.cpp and Tools.cpp. Create a single implementation of
each in Tools.cpp, eliminate the duplicate and share via Tools.h.
Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/arm-arch-darwin.c')
-rw-r--r-- | test/Driver/arm-arch-darwin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Driver/arm-arch-darwin.c b/test/Driver/arm-arch-darwin.c new file mode 100644 index 0000000000..55089619d1 --- /dev/null +++ b/test/Driver/arm-arch-darwin.c @@ -0,0 +1,6 @@ +// On Darwin, arch should override CPU for triple purposes +// RUN: %clang -target armv7m-apple-darwin -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-DARWIN %s +// CHECK-V7M-DARWIN: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m4" +// RUN: %clang -target armv7m -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-OVERRIDDEN %s +// CHECK-V7M-OVERRIDDEN: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4" + |