PM.add(TLI);
// Add the target data from the target machine, if it exists, or the module.
- if (const DataLayout *TD = Target.getDataLayout())
- PM.add(new DataLayout(*TD));
+ if (const DataLayout *DL = Target.getDataLayout())
+ PM.add(new DataLayout(*DL));
else
PM.add(new DataLayout(mod));
Passes.add(TLI);
// Add an appropriate DataLayout instance for this module.
- DataLayout *TD = 0;
+ DataLayout *DL = 0;
const std::string &ModuleDataLayout = M.get()->getDataLayout();
if (!ModuleDataLayout.empty())
- TD = new DataLayout(ModuleDataLayout);
+ DL = new DataLayout(ModuleDataLayout);
else if (!DefaultDataLayout.empty())
- TD = new DataLayout(DefaultDataLayout);
+ DL = new DataLayout(DefaultDataLayout);
- if (TD)
- Passes.add(TD);
+ if (DL)
+ Passes.add(DL);
Triple ModuleTriple(M->getTargetTriple());
TargetMachine *Machine = 0;
OwningPtr<FunctionPassManager> FPasses;
if (OptLevelO1 || OptLevelO2 || OptLevelOs || OptLevelOz || OptLevelO3) {
FPasses.reset(new FunctionPassManager(M.get()));
- if (TD)
- FPasses->add(new DataLayout(*TD));
+ if (DL)
+ FPasses->add(new DataLayout(*DL));
if (TM.get())
TM->addAnalysisPasses(*FPasses);