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
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;