summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-03-13 23:26:37 +0000
committerRui Ueyama <ruiu@google.com>2017-03-13 23:26:37 +0000
commit034a33a942a7bf807896cc9c8b4e6061a29a051f (patch)
tree7e9a0b8ce418c9ae62a233aafb08f23c6be371c0
parentf327999a4551bc83d2d474d258228007f7427597 (diff)
downloadbcm5719-llvm-034a33a942a7bf807896cc9c8b4e6061a29a051f.tar.gz
bcm5719-llvm-034a33a942a7bf807896cc9c8b4e6061a29a051f.zip
Remove a useless temporary variable.
llvm-svn: 297687
-rw-r--r--lld/ELF/Driver.cpp4
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;
}
OpenPOWER on IntegriCloud