aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-09 17:25:29 +0000
committerChris Lattner <sabre@nondot.org>2007-07-09 17:25:29 +0000
commit87bdba6d6a1684373c94df0363a3b620de6dab6c (patch)
treecd7dc95b8104d684c9beb8a7e9e34111aa5baf0d /lib/Target/Alpha
parent0f9d599dc96c61345a3e07642baaa5cffb061600 (diff)
downloadexternal_llvm-87bdba6d6a1684373c94df0363a3b620de6dab6c.zip
external_llvm-87bdba6d6a1684373c94df0363a3b620de6dab6c.tar.gz
external_llvm-87bdba6d6a1684373c94df0363a3b620de6dab6c.tar.bz2
The various "getModuleMatchQuality" implementations should return
zero if they see a target triple they don't understand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha')
-rw-r--r--lib/Target/Alpha/AlphaTargetMachine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaTargetMachine.cpp b/lib/Target/Alpha/AlphaTargetMachine.cpp
index bf7f221..d4137a5 100644
--- a/lib/Target/Alpha/AlphaTargetMachine.cpp
+++ b/lib/Target/Alpha/AlphaTargetMachine.cpp
@@ -35,6 +35,8 @@ unsigned AlphaTargetMachine::getModuleMatchQuality(const Module &M) {
if (TT.size() >= 5 && TT[0] == 'a' && TT[1] == 'l' && TT[2] == 'p' &&
TT[3] == 'h' && TT[4] == 'a')
return 20;
+ // If the target triple is something non-alpha, we don't match.
+ if (!TT.empty()) return 0;
if (M.getEndianness() == Module::LittleEndian &&
M.getPointerSize() == Module::Pointer64)