[lld] r336338 - [ELF] - Remove dead code. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 04:58:04 PDT 2018
Author: grimar
Date: Thu Jul 5 04:58:04 2018
New Revision: 336338
URL: http://llvm.org/viewvc/llvm-project?rev=336338&view=rev
Log:
[ELF] - Remove dead code. NFC.
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
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=336338&r1=336337&r2=336338&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Thu Jul 5 04:58:04 2018
@@ -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;
More information about the llvm-commits
mailing list