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:
Chris Lattner
2007-07-09 17:25:29 +00:00
parent 0f9d599dc9
commit 87bdba6d6a
7 changed files with 24 additions and 3 deletions

View File

@ -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)