summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
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
commit517290ae5245ad2bb543fe53ef13deb19e2a6eb7 (patch)
tree9cd41f75f5e3c3fa350c3af0c43275955a8a71a0 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parent6fec9a91b7e782491225a312fbcb5c0cf3146fbd (diff)
downloadbcm5719-llvm-517290ae5245ad2bb543fe53ef13deb19e2a6eb7.tar.gz
bcm5719-llvm-517290ae5245ad2bb543fe53ef13deb19e2a6eb7.zip
The various "getModuleMatchQuality" implementations should return
zero if they see a target triple they don't understand. llvm-svn: 38463
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index acb6191f9e2..57c84370f3c 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -55,6 +55,9 @@ unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
if (TT.size() >= 8 && std::string(TT.begin(), TT.begin()+8) == "powerpc-")
return 20;
+ // If the target triple is something non-powerpc, we don't match.
+ if (!TT.empty()) return 0;
+
if (M.getEndianness() == Module::BigEndian &&
M.getPointerSize() == Module::Pointer32)
return 10; // Weak match
OpenPOWER on IntegriCloud