diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-08 16:39:34 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-08 16:39:34 +0000 |
commit | 791cfc211a9801002bfda6b3eb4de7e041f04f53 (patch) | |
tree | 6cd0d628596726a82ceecfad41e0d747aecea7fa /tools/opt/opt.cpp | |
parent | 3574eca1b02600bac4e625297f4ecf745f4c4f32 (diff) | |
download | external_llvm-791cfc211a9801002bfda6b3eb4de7e041f04f53.zip external_llvm-791cfc211a9801002bfda6b3eb4de7e041f04f53.tar.gz external_llvm-791cfc211a9801002bfda6b3eb4de7e041f04f53.tar.bz2 |
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r-- | tools/opt/opt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 7ecd25c..706a7d5 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/LLVMContext.h" +#include "llvm/DataLayout.h" #include "llvm/DebugInfo.h" #include "llvm/Module.h" #include "llvm/PassManager.h" @@ -23,7 +24,6 @@ #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/RegionPass.h" #include "llvm/Analysis/CallGraph.h" -#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLibraryInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/StringSet.h" @@ -568,13 +568,13 @@ int main(int argc, char **argv) { TLI->disableAllFunctions(); Passes.add(TLI); - // Add an appropriate TargetData instance for this module. - TargetData *TD = 0; + // Add an appropriate DataLayout instance for this module. + DataLayout *TD = 0; const std::string &ModuleDataLayout = M.get()->getDataLayout(); if (!ModuleDataLayout.empty()) - TD = new TargetData(ModuleDataLayout); + TD = new DataLayout(ModuleDataLayout); else if (!DefaultDataLayout.empty()) - TD = new TargetData(DefaultDataLayout); + TD = new DataLayout(DefaultDataLayout); if (TD) Passes.add(TD); @@ -583,7 +583,7 @@ int main(int argc, char **argv) { if (OptLevelO1 || OptLevelO2 || OptLevelOs || OptLevelOz || OptLevelO3) { FPasses.reset(new FunctionPassManager(M.get())); if (TD) - FPasses->add(new TargetData(*TD)); + FPasses->add(new DataLayout(*TD)); } if (PrintBreakpoints) { |