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
|
// is called. We use that class without calling commit() to predict
|
||||||
// if the given file is writable.
|
// if the given file is writable.
|
||||||
static bool isWritable(StringRef Path) {
|
static bool isWritable(StringRef Path) {
|
||||||
ErrorOr<std::unique_ptr<FileOutputBuffer>> Err =
|
if (auto EC = FileOutputBuffer::create(Path, 1).getError()) {
|
||||||
FileOutputBuffer::create(Path, 1);
|
|
||||||
if (auto EC = Err.getError()) {
|
|
||||||
error("cannot open output file " + Path + ": " + EC.message());
|
error("cannot open output file " + Path + ": " + EC.message());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue