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 | 57f6d1946b1026eb4d0bbc1904b2833b254d4caa (patch) | |
tree | 2d83feb8b89d228039feff5214c9e3ac7802c5de /lib/Driver/Tools.cpp | |
parent | 4e648e4770d85febaf15ad8b7bad458bd7338ae2 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index c38767d432..bd65d6acc8 100644 --- a/lib/Driver/Tools.cpp +++ b/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(""); } |