Use std::thread directly.

Now that this code is posix only we don't need to use runBackground.

llvm-svn: 317632
This commit is contained in:
Rafael Espindola 2017-11-07 23:09:54 +00:00
parent 1501a26b39
commit c78890640e
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <thread>
using namespace llvm;
@ -61,7 +62,7 @@ void elf::unlinkAsync(StringRef Path) {
sys::fs::remove(Path);
// close and therefore remove TempPath in background.
runBackground([=] { ::close(FD); });
std::thread([=] { ::close(FD); }).detach();
#endif
}