diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-03-21 17:19:12 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-03-21 17:19:12 +0000 |
commit | 7f05ca38e42bba1ac82021b3b4728e56467710df (patch) | |
tree | 4f9ca968dc5d4784504bf5e7f50d899f1d381711 /clang/lib/Driver/Tools.cpp | |
parent | e2d4748ae35332c81ec7883d0f4fb8c532eda686 (diff) | |
download | bcm5719-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.cpp | 2 |
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(""); } |