Use Path instead of Config->OutputFile. NFC.
This function is always called with Config->OutputFile. That is not
obvious from reading the function. It should always use Path or take
no argument and always use Config->OutputFile.
llvm-svn: 317536
diff --git a/lld/ELF/Filesystem.cpp b/lld/ELF/Filesystem.cpp
index 35310b0..8848014 100644
--- a/lld/ELF/Filesystem.cpp
+++ b/lld/ELF/Filesystem.cpp
@@ -38,8 +38,8 @@
// This function spawns a background thread to call unlink.
// The calling thread returns almost immediately.
void elf::unlinkAsync(StringRef Path) {
- if (!ThreadsEnabled || !sys::fs::exists(Config->OutputFile) ||
- !sys::fs::is_regular_file(Config->OutputFile))
+ if (!ThreadsEnabled || !sys::fs::exists(Path) ||
+ !sys::fs::is_regular_file(Path))
return;
// First, rename Path to avoid race condition. We cannot remove