summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetMachine.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-03-09 20:25:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-03-09 20:25:39 +0000
commit0ee0da841dae2d2d78875f738cf9d3ecdfb9d390 (patch)
treec693fc2629715825a6f12d7f7918217febc7e065 /llvm/lib/Target/ARM/ARMTargetMachine.cpp
parent4249b9a698a004ed5647b8e9a514080ea4fb08c9 (diff)
downloadbcm5719-llvm-0ee0da841dae2d2d78875f738cf9d3ecdfb9d390.tar.gz
bcm5719-llvm-0ee0da841dae2d2d78875f738cf9d3ecdfb9d390.zip
ARM target now also recognize triplets like thumbv6-apple-darwin and set thumb mode and arch subversion. Eventually thumb triplets will go way and replaced with function notes.
llvm-svn: 66435
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index 919c2ffaf8f..6bb0b2e3cca 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -53,7 +53,9 @@ unsigned ThumbTargetMachine::getJITMatchQuality() {
unsigned ThumbTargetMachine::getModuleMatchQuality(const Module &M) {
std::string TT = M.getTargetTriple();
- if (TT.size() >= 6 && std::string(TT.begin(), TT.begin()+6) == "thumb-")
+ // Match thumb-foo-bar, as well as things like thumbv5blah-*
+ if (TT.size() >= 6 &&
+ (TT.substr(0, 6) == "thumb-" || TT.substr(0, 6) == "thumbv"))
return 20;
// If the target triple is something non-thumb, we don't match.
@@ -105,7 +107,8 @@ unsigned ARMTargetMachine::getJITMatchQuality() {
unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) {
std::string TT = M.getTargetTriple();
- if (TT.size() >= 4 && // Match arm-foo-bar, as well as things like armv5blah-*
+ // Match arm-foo-bar, as well as things like armv5blah-*
+ if (TT.size() >= 4 &&
(TT.substr(0, 4) == "arm-" || TT.substr(0, 4) == "armv"))
return 20;
// If the target triple is something non-arm, we don't match.
OpenPOWER on IntegriCloud