[lld] r331658 - Do not pass Config members to simplify function signature. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon May 7 10:59:52 PDT 2018
Author: ruiu
Date: Mon May 7 10:59:52 2018
New Revision: 331658
URL: http://llvm.org/viewvc/llvm-project?rev=331658&view=rev
Log:
Do not pass Config members to simplify function signature. NFC.
Modified:
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=331658&r1=331657&r2=331658&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Mon May 7 10:59:52 2018
@@ -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
// 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);
}
More information about the llvm-commits
mailing list