mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
One last pass of DataLayout variable renaming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb6e1d3165
commit
ed6718d228
@ -293,8 +293,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
PM.add(TLI);
|
PM.add(TLI);
|
||||||
|
|
||||||
// Add the target data from the target machine, if it exists, or the module.
|
// Add the target data from the target machine, if it exists, or the module.
|
||||||
if (const DataLayout *TD = Target.getDataLayout())
|
if (const DataLayout *DL = Target.getDataLayout())
|
||||||
PM.add(new DataLayout(*TD));
|
PM.add(new DataLayout(*DL));
|
||||||
else
|
else
|
||||||
PM.add(new DataLayout(mod));
|
PM.add(new DataLayout(mod));
|
||||||
|
|
||||||
|
@ -425,15 +425,15 @@ int main(int argc, char **argv) {
|
|||||||
Passes.add(TLI);
|
Passes.add(TLI);
|
||||||
|
|
||||||
// Add an appropriate DataLayout instance for this module.
|
// Add an appropriate DataLayout instance for this module.
|
||||||
DataLayout *TD = 0;
|
DataLayout *DL = 0;
|
||||||
const std::string &ModuleDataLayout = M.get()->getDataLayout();
|
const std::string &ModuleDataLayout = M.get()->getDataLayout();
|
||||||
if (!ModuleDataLayout.empty())
|
if (!ModuleDataLayout.empty())
|
||||||
TD = new DataLayout(ModuleDataLayout);
|
DL = new DataLayout(ModuleDataLayout);
|
||||||
else if (!DefaultDataLayout.empty())
|
else if (!DefaultDataLayout.empty())
|
||||||
TD = new DataLayout(DefaultDataLayout);
|
DL = new DataLayout(DefaultDataLayout);
|
||||||
|
|
||||||
if (TD)
|
if (DL)
|
||||||
Passes.add(TD);
|
Passes.add(DL);
|
||||||
|
|
||||||
Triple ModuleTriple(M->getTargetTriple());
|
Triple ModuleTriple(M->getTargetTriple());
|
||||||
TargetMachine *Machine = 0;
|
TargetMachine *Machine = 0;
|
||||||
@ -448,8 +448,8 @@ int main(int argc, char **argv) {
|
|||||||
OwningPtr<FunctionPassManager> FPasses;
|
OwningPtr<FunctionPassManager> FPasses;
|
||||||
if (OptLevelO1 || OptLevelO2 || OptLevelOs || OptLevelOz || OptLevelO3) {
|
if (OptLevelO1 || OptLevelO2 || OptLevelOs || OptLevelOz || OptLevelO3) {
|
||||||
FPasses.reset(new FunctionPassManager(M.get()));
|
FPasses.reset(new FunctionPassManager(M.get()));
|
||||||
if (TD)
|
if (DL)
|
||||||
FPasses->add(new DataLayout(*TD));
|
FPasses->add(new DataLayout(*DL));
|
||||||
if (TM.get())
|
if (TM.get())
|
||||||
TM->addAnalysisPasses(*FPasses);
|
TM->addAnalysisPasses(*FPasses);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user