Rename Config::ThinLTOIndexOnlyObjectFiles -> Config::ThinLTOIndexOnlyArg.
llvm-svn: 331699
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index b1e1b03..90a0123 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -70,9 +70,6 @@
 // Creates an empty file to store a list of object files for final
 // linking of distributed ThinLTO.
 static std::unique_ptr<raw_fd_ostream> openFile(StringRef File) {
-  if (File.empty())
-    return nullptr;
-
   std::error_code EC;
   auto Ret =
       llvm::make_unique<raw_fd_ostream>(File, EC, sys::fs::OpenFlags::F_None);
@@ -136,7 +133,10 @@
   lto::ThinBackend Backend;
 
   if (Config->ThinLTOIndexOnly) {
-    IndexFile = openFile(Config->ThinLTOIndexOnlyObjectsFile);
+    StringRef Path = Config->ThinLTOIndexOnlyArg;
+    if (!Path.empty())
+      IndexFile = openFile(Path);
+
     Backend = lto::createWriteIndexesThinBackend(
         Config->ThinLTOPrefixReplace.first, Config->ThinLTOPrefixReplace.second,
         Config->ThinLTOEmitImportsFiles, IndexFile.get(), nullptr);