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.