Revert "Remove access to the DataLayout in the TargetMachine"
[oota-llvm.git] / lib / Target / SystemZ / SystemZISelLowering.cpp
index 3c5d185ffe89899aa609161004fe2a1bff00f6a1..056ee02dcc2110582fd5f5c6582769bd199e7e64 100644 (file)
@@ -84,7 +84,8 @@ static MachineOperand earlyUseOperand(MachineOperand Op) {
 SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
                                              const SystemZSubtarget &STI)
     : TargetLowering(TM), Subtarget(STI) {
-  MVT PtrVT = MVT::getIntegerVT(8 * TM.getPointerSize());
+  auto &DL = *TM.getDataLayout();
+  MVT PtrVT = getPointerTy(DL);
 
   // Set up the register classes.
   if (Subtarget.hasHighWord())