diff options
author | Rui Ueyama <ruiu@google.com> | 2015-01-29 22:18:28 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-01-29 22:18:28 +0000 |
commit | da72c246ed59b0e3ea1481a8b87f8db6ebde7dc9 (patch) | |
tree | 0de0dec43952fbaadb640a5aec4abe028e0ee383 | |
parent | c4038ab5bf3ee228a2bb0d3e1b2940e7c3318a0c (diff) | |
download | bcm5719-llvm-da72c246ed59b0e3ea1481a8b87f8db6ebde7dc9.tar.gz bcm5719-llvm-da72c246ed59b0e3ea1481a8b87f8db6ebde7dc9.zip |
ELF: Remove dead code.
_runLayoutPass is always true. No way to set a new value to the
member variable.
llvm-svn: 227501
-rw-r--r-- | lld/include/lld/ReaderWriter/ELFLinkingContext.h | 1 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp | 13 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lld/include/lld/ReaderWriter/ELFLinkingContext.h b/lld/include/lld/ReaderWriter/ELFLinkingContext.h index 93f84b59c7f..c6a8ebf7fb6 100644 --- a/lld/include/lld/ReaderWriter/ELFLinkingContext.h +++ b/lld/include/lld/ReaderWriter/ELFLinkingContext.h @@ -307,7 +307,6 @@ protected: bool _noInhibitExec; bool _exportDynamic; bool _mergeCommonStrings; - bool _runLayoutPass; bool _useShlibUndefines; bool _dynamicLinkerArg; bool _noAllowDynamicLibraries; diff --git a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp index 446ac902121..93ccf7a1214 100644 --- a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp @@ -59,15 +59,14 @@ ELFLinkingContext::ELFLinkingContext( : _outputELFType(llvm::ELF::ET_EXEC), _triple(triple), _targetHandler(std::move(targetHandler)), _baseAddress(0), _isStaticExecutable(false), _noInhibitExec(false), _exportDynamic(false), - _mergeCommonStrings(false), _runLayoutPass(true), - _useShlibUndefines(true), _dynamicLinkerArg(false), - _noAllowDynamicLibraries(false), _mergeRODataToTextSegment(true), - _demangle(true), _alignSegments(true), _outputMagic(OutputMagic::DEFAULT), - _initFunction("_init"), _finiFunction("_fini"), _sysrootPath("") {} + _mergeCommonStrings(false), _useShlibUndefines(true), + _dynamicLinkerArg(false), _noAllowDynamicLibraries(false), + _mergeRODataToTextSegment(true), _demangle(true), _alignSegments(true), + _outputMagic(OutputMagic::DEFAULT), _initFunction("_init"), + _finiFunction("_fini"), _sysrootPath("") {} void ELFLinkingContext::addPasses(PassManager &pm) { - if (_runLayoutPass) - pm.add(std::unique_ptr<Pass>(new LayoutPass(registry()))); + pm.add(std::unique_ptr<Pass>(new LayoutPass(registry()))); pm.add(std::unique_ptr<Pass>(new elf::ArrayOrderPass())); } |