forked from OSchip/llvm-project
parent
f327999a45
commit
034a33a942
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue