mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,15 +14,6 @@ using namespace llvm;
|
||||
|
||||
Target llvm::TheXCoreTarget;
|
||||
|
||||
static unsigned XCore_TripleMatchQuality(const std::string &TT) {
|
||||
if (TT.size() >= 6 && std::string(TT.begin(), TT.begin()+6) == "xcore-")
|
||||
return 20;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void LLVMInitializeXCoreTargetInfo() {
|
||||
TargetRegistry::RegisterTarget(TheXCoreTarget, "xcore",
|
||||
"XCore",
|
||||
&XCore_TripleMatchQuality);
|
||||
RegisterTarget<Triple::xcore> X(TheXCoreTarget, "xcore", "XCore");
|
||||
}
|
||||
|
Reference in New Issue
Block a user