Remove a useless temporary variable.

llvm-svn: 297687
This commit is contained in:
Rui Ueyama 2017-03-13 23:26:37 +00:00
parent f327999a45
commit 034a33a942
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}