opt and llc use datalayout differently - bug?

It appears llc gives preference to the default target datalayout whereas opt gives preference to the module datalayout. Is there a reason they behave differently?

From llc.cpp:
   // Add the target data from the target machine, if it exists, or the module.
   if (const TargetData *TD = Target.getTargetData())
     PM.add(new TargetData(*TD));
   else
     PM.add(new TargetData(&mod));

From opt.cpp:
   // Add an appropriate TargetData instance for this module.
   TargetData *TD = 0;
   const std::string &ModuleDataLayout = M.get()->getDataLayout();
   if (!ModuleDataLayout.empty())
     TD = new TargetData(ModuleDataLayout);
   else if (!DefaultDataLayout.empty())
     TD = new TargetData(DefaultDataLayout);

   if (TD)
     Passes.add(TD);

Hi JP,

It appears llc gives preference to the default target datalayout whereas
opt gives preference to the module datalayout.

llc completely ignores the target datalayout because it already knows how
the target lays out data. Target datalayout exists entirely for the
benefit of opt: it allows opt to use target specific information without
having to be linked with the code generators.

Ciao, Duncan.