From a1d4c10c61fe9541c0cc191f0ba702cc868da0a2 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 8 Oct 2013 03:59:48 +0000 Subject: [PATCH] Remove an unnecessary local variable. llvm-svn: 192164 --- lld/include/lld/Driver/CoreInputGraph.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lld/include/lld/Driver/CoreInputGraph.h b/lld/include/lld/Driver/CoreInputGraph.h index b2581a3..a24470f 100644 --- a/lld/include/lld/Driver/CoreInputGraph.h +++ b/lld/include/lld/Driver/CoreInputGraph.h @@ -41,7 +41,7 @@ public: } /// \brief Parse the input file to lld::File. - llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { + error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { ErrorOr filePath = path(ctx); if (!filePath && error_code(filePath) == llvm::errc::no_such_file_or_directory) @@ -49,16 +49,12 @@ public: // Create a memory buffer OwningPtr opmb; - llvm::error_code ec; - - if ((ec = llvm::MemoryBuffer::getFileOrSTDIN(*filePath, opmb))) + if (error_code ec = llvm::MemoryBuffer::getFileOrSTDIN(*filePath, opmb)) return ec; std::unique_ptr mb(opmb.take()); _buffer = std::move(mb); - - ec = _ctx.getDefaultReader().parseFile(_buffer, _files); - return ec; + return _ctx.getDefaultReader().parseFile(_buffer, _files); } /// \brief Return the file that has to be processed by the resolver -- 2.7.4