diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-07-09 17:25:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-07-09 17:25:29 +0000 |
| commit | 517290ae5245ad2bb543fe53ef13deb19e2a6eb7 (patch) | |
| tree | 9cd41f75f5e3c3fa350c3af0c43275955a8a71a0 /llvm/lib/Target/Sparc/SparcTargetMachine.cpp | |
| parent | 6fec9a91b7e782491225a312fbcb5c0cf3146fbd (diff) | |
| download | llvm-517290ae5245ad2bb543fe53ef13deb19e2a6eb7.zip llvm-517290ae5245ad2bb543fe53ef13deb19e2a6eb7.tar.gz llvm-517290ae5245ad2bb543fe53ef13deb19e2a6eb7.tar.bz2 | |
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/Sparc/SparcTargetMachine.cpp')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcTargetMachine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ unsigned SparcTargetMachine::getModuleMatchQuality(const Module &M) { 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) |
