ELF: Remove dead code.

_runLayoutPass is always true. No way to set a new value to the
member variable.

llvm-svn: 227501
This commit is contained in:
Rui Ueyama 2015-01-29 22:18:28 +00:00
parent c4038ab5bf
commit da72c246ed
2 changed files with 6 additions and 8 deletions

View File

@ -307,7 +307,6 @@ protected:
bool _noInhibitExec;
bool _exportDynamic;
bool _mergeCommonStrings;
bool _runLayoutPass;
bool _useShlibUndefines;
bool _dynamicLinkerArg;
bool _noAllowDynamicLibraries;

View File

@ -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()));
}