diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-29 20:37:19 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-29 20:37:19 +0000 |
commit | cc5a882c96af6e36bc029b7ff69f62f94e2d041d (patch) | |
tree | c26c2846093ad1eee8ab7a5ccb5998af8019a392 /tools | |
parent | aae0fa998af0f65221d7b98630162be6d88f05dc (diff) | |
download | external_llvm-cc5a882c96af6e36bc029b7ff69f62f94e2d041d.zip external_llvm-cc5a882c96af6e36bc029b7ff69f62f94e2d041d.tar.gz external_llvm-cc5a882c96af6e36bc029b7ff69f62f94e2d041d.tar.bz2 |
Don't reach into the middle of TargetMachine and cache one of its ivars.
Not only does this break encapsulation, it's gross.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 2 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 8b339ee..465ccb4 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -310,7 +310,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { // mark which symbols can not be internalized MCContext Context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(),NULL); - Mangler mangler(Context, *_target->getDataLayout()); + Mangler mangler(Context, _target); std::vector<const char*> mustPreserveList; SmallPtrSet<GlobalValue*, 8> asmUsed; diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 21cf4a6..2c308b6 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->getDataLayout()) {} + _mangler(_context, t) {} /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. |