Move most user of TargetMachine::getDataLayout to the Module one
[oota-llvm.git] / lib / CodeGen / AsmPrinter / ErlangGCPrinter.cpp
index eb9e4c10daf45cbd201e3cfd6d3499ec8c22d88d..6a023b998b326f1a6df00bbc3a925796a2db55f8 100644 (file)
@@ -48,7 +48,7 @@ void llvm::linkErlangGCPrinter() {}
 void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
                                      AsmPrinter &AP) {
   MCStreamer &OS = *AP.OutStreamer;
-  unsigned IntPtrSize = AP.TM.getDataLayout()->getPointerSize();
+  unsigned IntPtrSize = M.getDataLayout().getPointerSize();
 
   // Put this in a custom .note section.
   OS.SwitchSection(