[ELF] - Remove dead code. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Jul 2018 11:58:04 +0000 (11:58 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Jul 2018 11:58:04 +0000 (11:58 +0000)
I think code is dead, because the only way to see
Path as empty seems would be if replaceThinLTOSuffix()
replaced some prefix with empty prefix (making the result
Path empty).

But it is impossible to pass the empty prefix,
we would file in driver:
https://github.com/llvm-mirror/lld/blob/master/ELF/Driver.cpp#L669

llvm-svn: 336338

lld/ELF/LTO.cpp

index 168bfc9..b22f071 100644 (file)
@@ -201,9 +201,6 @@ void BitcodeCompiler::add(BitcodeFile &F) {
 
 static void createEmptyIndex(StringRef ModulePath) {
   std::string Path = replaceThinLTOSuffix(getThinLTOOutputFile(ModulePath));
-  if (Path.empty())
-    return;
-
   std::unique_ptr<raw_fd_ostream> OS = openFile(Path + ".thinlto.bc");
   if (!OS)
     return;