The various "getModuleMatchQuality" implementations should return
zero if they see a target triple they don't understand.
llvm-svn: 38463
diff --git a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp
index ac43736..b67c300 100644
--- a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -39,6 +39,9 @@
std::string TT = M.getTargetTriple();
if (TT.size() >= 6 && std::string(TT.begin(), TT.begin()+6) == "sparc-")
return 20;
+
+ // If the target triple is something non-sparc, we don't match.
+ if (!TT.empty()) return 0;
if (M.getEndianness() == Module::BigEndian &&
M.getPointerSize() == Module::Pointer32)