summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-03-21 17:19:12 +0000
committerBob Wilson <bob.wilson@apple.com>2012-03-21 17:19:12 +0000
commit7f05ca38e42bba1ac82021b3b4728e56467710df (patch)
tree4f9ca968dc5d4784504bf5e7f50d899f1d381711 /clang/lib/Driver/Tools.cpp
parente2d4748ae35332c81ec7883d0f4fb8c532eda686 (diff)
downloadbcm5719-llvm-7f05ca38e42bba1ac82021b3b4728e56467710df.tar.gz
bcm5719-llvm-7f05ca38e42bba1ac82021b3b4728e56467710df.zip
Duplicated code is bad. At least make it consistent.
The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both Toolchain.cpp and Tools.cpp. This stuff needs a thorough overhaul. In the meantime, this patch at least makes them consistent. One version had been converted to use StringSwitch, and the other version had new Cortex M-series processors added. llvm-svn: 153202
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index c38767d432d..bd65d6acc87 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -483,6 +483,8 @@ static const char *getLLVMArchSuffixForARM(StringRef CPU) {
.Cases("arm1176jzf-s", "mpcorenovfp", "mpcore", "v6")
.Cases("arm1156t2-s", "arm1156t2f-s", "v6t2")
.Cases("cortex-a8", "cortex-a9", "v7")
+ .Case("cortex-m3", "v7m")
+ .Case("cortex-m0", "v6m")
.Default("");
}
OpenPOWER on IntegriCloud