Remove access to the DataLayout in the TargetMachine
[oota-llvm.git] / tools / llc / llc.cpp
index e33cd795d3ae2d01b2fe708ad6e8c70d6779d16a..c51c012391b2e6fe422df4cc797653779a55cce9 100644 (file)
@@ -312,8 +312,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
   PM.add(new TargetLibraryInfoWrapperPass(TLII));
 
   // Add the target data from the target machine, if it exists, or the module.
-  if (const DataLayout *DL = Target->getDataLayout())
-    M->setDataLayout(*DL);
+  M->setDataLayout(Target->createDataLayout());
 
   // Override function attributes based on CPUStr, FeaturesStr, and command line
   // flags.