Handle "-" in tryCreateFile.
Otherwise we would fail with -M if the we didn't have write
permissions to the current directory.
llvm-svn: 317740
diff --git a/lld/ELF/Filesystem.cpp b/lld/ELF/Filesystem.cpp
index 1aa3453..a7c25c9 100644
--- a/lld/ELF/Filesystem.cpp
+++ b/lld/ELF/Filesystem.cpp
@@ -80,5 +80,7 @@
std::error_code elf::tryCreateFile(StringRef Path) {
if (Path.empty())
return std::error_code();
+ if (Path == "-")
+ return std::error_code();
return errorToErrorCode(FileOutputBuffer::create(Path, 1).takeError());
}