aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-06 02:29:28 +0000
committerChris Lattner <sabre@nondot.org>2008-05-06 02:29:28 +0000
commitaccc87c1d9e3f4dacefcba2e1b8621e6ab5d8dd5 (patch)
treeeffbbc64759cee54ffc1247025d72c4cf3307507
parent2c37da52902a619dc12b5dd46040fd223ee7d2eb (diff)
downloadexternal_llvm-accc87c1d9e3f4dacefcba2e1b8621e6ab5d8dd5.zip
external_llvm-accc87c1d9e3f4dacefcba2e1b8621e6ab5d8dd5.tar.gz
external_llvm-accc87c1d9e3f4dacefcba2e1b8621e6ab5d8dd5.tar.bz2
Match things like 'armv5tejl-unknown-linux-gnu' for PR2290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50698 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMTargetMachine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp
index 1b51373..d084fff 100644
--- a/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/lib/Target/ARM/ARMTargetMachine.cpp
@@ -94,7 +94,8 @@ unsigned ARMTargetMachine::getJITMatchQuality() {
unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) {
std::string TT = M.getTargetTriple();
- if (TT.size() >= 4 && std::string(TT.begin(), TT.begin()+4) == "arm-")
+ if (TT.size() >= 4 && // Match arm-foo-bar, as well as things like armv5blah-*
+ (TT.substr(0, 4) == "arm-" || TT.substr(0, 4) == "armv"))
return 20;
// If the target triple is something non-arm, we don't match.
if (!TT.empty()) return 0;