forked from OSchip/llvm-project
Handle "-" in tryCreateFile.
Otherwise we would fail with -M if the we didn't have write permissions to the current directory. llvm-svn: 317740
This commit is contained in:
parent
f6490e047a
commit
85b8d0ca7c
|
@ -80,5 +80,7 @@ void elf::unlinkAsync(StringRef Path) {
|
|||
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());
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# RUN: mkdir -p %t.dir
|
||||
# RUN: chmod 100 %t.dir
|
||||
# RUN: cd %t.dir
|
||||
# RUN: ld.lld %t.o -o %t.exe
|
||||
# RUN: ld.lld %t.o -o %t.exe -M
|
||||
# RUN: chmod 755 %t.dir
|
||||
|
||||
.globl _start
|
||||
|
|
Loading…
Reference in New Issue