diff options
-rw-r--r-- | lld/ELF/Driver.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 53a450eaf23..e76a1a61ea9 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -812,9 +812,7 @@ static uint64_t getImageBase(opt::InputArgList &Args) { // is called. We use that class without calling commit() to predict // if the given file is writable. static bool isWritable(StringRef Path) { - ErrorOr<std::unique_ptr<FileOutputBuffer>> Err = - FileOutputBuffer::create(Path, 1); - if (auto EC = Err.getError()) { + if (auto EC = FileOutputBuffer::create(Path, 1).getError()) { error("cannot open output file " + Path + ": " + EC.message()); return false; } |