Have MSP430SelectionDAGInfo constructor take a DataLayout rather
authorEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 00:37:57 +0000 (00:37 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 00:37:57 +0000 (00:37 +0000)
than a target machine since it doesn't need anything past the
DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211826 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/MSP430SelectionDAGInfo.cpp
lib/Target/MSP430/MSP430SelectionDAGInfo.h
lib/Target/MSP430/MSP430TargetMachine.cpp

index 6ebddaf..3897ef6 100644 (file)
@@ -16,8 +16,8 @@ using namespace llvm;
 
 #define DEBUG_TYPE "msp430-selectiondag-info"
 
-MSP430SelectionDAGInfo::MSP430SelectionDAGInfo(const MSP430TargetMachine &TM)
-    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
+MSP430SelectionDAGInfo::MSP430SelectionDAGInfo(const DataLayout &DL)
+    : TargetSelectionDAGInfo(&DL) {}
 
 MSP430SelectionDAGInfo::~MSP430SelectionDAGInfo() {
 }
index fa81948..cb04adc 100644 (file)
@@ -22,7 +22,7 @@ class MSP430TargetMachine;
 
 class MSP430SelectionDAGInfo : public TargetSelectionDAGInfo {
 public:
-  explicit MSP430SelectionDAGInfo(const MSP430TargetMachine &TM);
+  explicit MSP430SelectionDAGInfo(const DataLayout &DL);
   ~MSP430SelectionDAGInfo();
 };
 
index 50be2be..23a98aa 100644 (file)
@@ -35,7 +35,7 @@ MSP430TargetMachine::MSP430TargetMachine(const Target &T,
     Subtarget(TT, CPU, FS),
     // FIXME: Check DataLayout string.
     DL("e-m:e-p:16:16-i32:16:32-n8:16"),
-    InstrInfo(*this), TLInfo(*this), TSInfo(*this),
+    InstrInfo(*this), TLInfo(*this), TSInfo(DL),
     FrameLowering(Subtarget) {
   initAsmInfo();
 }