mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
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
This commit is contained in:
@ -40,13 +40,14 @@ MipsTargetMachine(const Module &M, const std::string &FS):
|
||||
|
||||
// return 0 and must specify -march to gen MIPS code.
|
||||
unsigned MipsTargetMachine::
|
||||
getModuleMatchQuality(const Module &M)
|
||||
{
|
||||
getModuleMatchQuality(const Module &M) {
|
||||
// We strongly match "mips-*".
|
||||
std::string TT = M.getTargetTriple();
|
||||
if (TT.size() >= 5 && std::string(TT.begin(), TT.begin()+5) == "mips-")
|
||||
return 20;
|
||||
|
||||
// If the target triple is something non-mips, we don't match.
|
||||
if (!TT.empty()) return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user