diff options
author | Rui Ueyama <ruiu@google.com> | 2018-05-07 17:59:52 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2018-05-07 17:59:52 +0000 |
commit | f64f345e1ba0ec613e78f1b709b95f74f67cc477 (patch) | |
tree | 6c61f1754ae4c67d1f30ce0cc1c4346ad403f81f | |
parent | 4454b3d1ebf50e2f0b33b30075e38dbb1d2b8ec7 (diff) | |
download | bcm5719-llvm-f64f345e1ba0ec613e78f1b709b95f74f67cc477.tar.gz bcm5719-llvm-f64f345e1ba0ec613e78f1b709b95f74f67cc477.zip |
Do not pass Config members to simplify function signature. NFC.
llvm-svn: 331658
-rw-r--r-- | lld/ELF/LTO.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 6befa257be8..a422ebb6c4c 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -80,13 +80,12 @@ static void checkError(Error E) { // to skip the compilation of the corresponding module and produce an empty // object file. static void writeEmptyDistributedBuildOutputs(StringRef ModulePath, - StringRef OldPrefix, - StringRef NewPrefix, bool SkipModule) { std::string NewModulePath = - lto::getThinLTOOutputFile(ModulePath, OldPrefix, NewPrefix); - std::error_code EC; + lto::getThinLTOOutputFile(ModulePath, Config->ThinLTOPrefixReplace.first, + Config->ThinLTOPrefixReplace.second); + std::error_code EC; raw_fd_ostream OS(NewModulePath + ".thinlto.bc", EC, sys::fs::OpenFlags::F_None); if (EC) @@ -192,9 +191,7 @@ void BitcodeCompiler::add(BitcodeFile &F) { // Create the empty files which, if indexed, will be overwritten later. if (Config->ThinLTOIndexOnly) - writeEmptyDistributedBuildOutputs( - Obj.getName(), Config->ThinLTOPrefixReplace.first, - Config->ThinLTOPrefixReplace.second, false); + writeEmptyDistributedBuildOutputs(Obj.getName(), false); unsigned SymNum = 0; std::vector<Symbol *> Syms = F.getSymbols(); @@ -309,7 +306,5 @@ std::vector<InputFile *> BitcodeCompiler::compile() { // For lazy object files not added to link, adds empty index files void BitcodeCompiler::addLazyObjFile(LazyObjFile *File) { writeEmptyDistributedBuildOutputs(File->getBuffer().getBufferIdentifier(), - Config->ThinLTOPrefixReplace.first, - Config->ThinLTOPrefixReplace.second, /*SkipModule=*/true); } |