Use twines to simplify calls to report_fatal_error. For code size and readability.
[oota-llvm.git] / lib / Target / CellSPU / SPUTargetMachine.cpp
index 16b923b8ce7d322702d2b805bd315d9a0da2a10d..6500067849dbd1581425213f56a7906bee3c70f8 100644 (file)
@@ -13,9 +13,8 @@
 
 #include "SPU.h"
 #include "SPURegisterNames.h"
-#include "SPUTargetAsmInfo.h"
+#include "SPUMCAsmInfo.h"
 #include "SPUTargetMachine.h"
-#include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/CodeGen/RegAllocRegistry.h"
 #include "llvm/CodeGen/SchedulerRegistry.h"
@@ -26,6 +25,7 @@ using namespace llvm;
 extern "C" void LLVMInitializeCellSPUTarget() { 
   // Register the target.
   RegisterTargetMachine<SPUTargetMachine> X(TheCellSPUTarget);
+  RegisterAsmInfo<SPULinuxMCAsmInfo> Y(TheCellSPUTarget);
 }
 
 const std::pair<unsigned, int> *
@@ -34,14 +34,10 @@ SPUFrameInfo::getCalleeSaveSpillSlots(unsigned &NumEntries) const {
   return &LR[0];
 }
 
-const TargetAsmInfo *SPUTargetMachine::createTargetAsmInfo() const {
-  return new SPULinuxTargetAsmInfo();
-}
-
-SPUTargetMachine::SPUTargetMachine(const Target &T, const Module &M, 
+SPUTargetMachine::SPUTargetMachine(const Target &T, const std::string &TT,
                                    const std::string &FS)
-  : LLVMTargetMachine(T),
-    Subtarget(M.getTargetTriple(), FS),
+  : LLVMTargetMachine(T, TT),
+    Subtarget(TT, FS),
     DataLayout(Subtarget.getTargetDataString()),
     InstrInfo(*this),
     FrameInfo(*this),