Teach the pic16 target to recognize pic16-*-* triples.
[oota-llvm.git] / lib / Target / PIC16 / TargetInfo / PIC16TargetInfo.cpp
index 87341b20e219fa13d27f898662db4c62dd420573..f1bdb1210fc60233229f0fa6164bd4fe7215f92a 100644 (file)
 #include "llvm/Target/TargetRegistry.h"
 using namespace llvm;
 
-Target llvm::ThePIC16Target;
-
-static unsigned PIC16_TripleMatchQuality(const std::string &TT) {
-  return 0;
-}
-
-Target llvm::TheCooperTarget;
-
-static unsigned Cooper_TripleMatchQuality(const std::string &TT) {
-  return 0;
-}
+Target llvm::ThePIC16Target, llvm::TheCooperTarget;
 
 extern "C" void LLVMInitializePIC16TargetInfo() { 
-  TargetRegistry::RegisterTarget(ThePIC16Target, "pic16",
-                                  "PIC16 14-bit [experimental]",
-                                  &PIC16_TripleMatchQuality);
+  RegisterTarget<Triple::pic16> X(ThePIC16Target, "pic16",
+                                  "PIC16 14-bit [experimental]");
 
-  TargetRegistry::RegisterTarget(TheCooperTarget, "cooper",    
-                                  "PIC16 Cooper [experimental]",
-                                  &Cooper_TripleMatchQuality);
+  RegisterTarget<> Y(TheCooperTarget, "cooper", "PIC16 Cooper [experimental]");
 }