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/lto | |
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/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 10 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index f8b07b2..f1814ab 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -15,6 +15,7 @@ #include "LTOCodeGenerator.h" #include "LTOModule.h" #include "llvm/Constants.h" +#include "llvm/DataLayout.h" #include "llvm/DerivedTypes.h" #include "llvm/Linker.h" #include "llvm/LLVMContext.h" @@ -29,7 +30,6 @@ #include "llvm/MC/SubtargetFeature.h" #include "llvm/Target/Mangler.h" #include "llvm/Target/TargetOptions.h" -#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Transforms/IPO.h" @@ -293,7 +293,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { // mark which symbols can not be internalized MCContext Context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(),NULL); - Mangler mangler(Context, *_target->getTargetData()); + Mangler mangler(Context, *_target->getDataLayout()); std::vector<const char*> mustPreserveList; SmallPtrSet<GlobalValue*, 8> asmUsed; @@ -361,8 +361,8 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out, // Start off with a verification pass. passes.add(createVerifierPass()); - // Add an appropriate TargetData instance for this module... - passes.add(new TargetData(*_target->getTargetData())); + // Add an appropriate DataLayout instance for this module... + passes.add(new DataLayout(*_target->getDataLayout())); // Enabling internalize here would use its AllButMain variant. It // keeps only main if it exists and does nothing for libraries. Instead @@ -376,7 +376,7 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out, FunctionPassManager *codeGenPasses = new FunctionPassManager(mergedModule); - codeGenPasses->add(new TargetData(*_target->getTargetData())); + codeGenPasses->add(new DataLayout(*_target->getDataLayout())); formatted_raw_ostream Out(out); diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index b98bfab..3c3701a 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -158,7 +158,7 @@ SSPBufferSize("stack-protector-buffer-size", cl::init(8), LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t) : _module(m), _target(t), _context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(), NULL), - _mangler(_context, *_target->getTargetData()) {} + _mangler(_context, *_target->getDataLayout()) {} /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. |