mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +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:
@ -62,6 +62,8 @@ unsigned X86_32TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
if (TT.size() >= 5 && TT[0] == 'i' && TT[2] == '8' && TT[3] == '6' &&
|
||||
TT[4] == '-' && TT[1] - '3' < 6)
|
||||
return 20;
|
||||
// If the target triple is something non-X86, we don't match.
|
||||
if (!TT.empty()) return 0;
|
||||
|
||||
if (M.getEndianness() == Module::LittleEndian &&
|
||||
M.getPointerSize() == Module::Pointer32)
|
||||
@ -85,6 +87,9 @@ unsigned X86_64TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
TT[3] == '6' && TT[4] == '4' && TT[5] == '-')
|
||||
return 20;
|
||||
|
||||
// If the target triple is something non-X86-64, we don't match.
|
||||
if (!TT.empty()) return 0;
|
||||
|
||||
if (M.getEndianness() == Module::LittleEndian &&
|
||||
M.getPointerSize() == Module::Pointer64)
|
||||
return 10; // Weak match
|
||||
|
Reference in New Issue
Block a user