summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/GnuLdInputGraph.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-08 22:00:09 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-08 22:00:09 +0000
commitd28918b28996051a156f4ee0c11c884ea3cbcdc9 (patch)
tree578350222de8187727fd44d68fa3de7f0f5dcea1 /lld/lib/Driver/GnuLdInputGraph.cpp
parent98f3de8880d4d387135b1a8407ba82d212b00862 (diff)
downloadbcm5719-llvm-d28918b28996051a156f4ee0c11c884ea3cbcdc9.tar.gz
bcm5719-llvm-d28918b28996051a156f4ee0c11c884ea3cbcdc9.zip
Use getError instead of the error_code operator.
llvm-svn: 198797
Diffstat (limited to 'lld/lib/Driver/GnuLdInputGraph.cpp')
-rw-r--r--lld/lib/Driver/GnuLdInputGraph.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/lib/Driver/GnuLdInputGraph.cpp b/lld/lib/Driver/GnuLdInputGraph.cpp
index 9a5bab4331c..9becadb5ed9 100644
--- a/lld/lib/Driver/GnuLdInputGraph.cpp
+++ b/lld/lib/Driver/GnuLdInputGraph.cpp
@@ -16,8 +16,8 @@ using namespace lld;
error_code ELFFileNode::parse(const LinkingContext &ctx,
raw_ostream &diagnostics) {
ErrorOr<StringRef> filePath = getPath(ctx);
- if (!filePath)
- return error_code(filePath);
+ if (error_code ec = filePath.getError())
+ return ec;
if (error_code ec = getBuffer(*filePath))
return ec;
@@ -51,8 +51,8 @@ error_code ELFFileNode::parse(const LinkingContext &ctx,
error_code GNULdScript::parse(const LinkingContext &ctx,
raw_ostream &diagnostics) {
ErrorOr<StringRef> filePath = getPath(ctx);
- if (!filePath)
- return error_code(filePath);
+ if (error_code ec = filePath.getError())
+ return ec;
if (error_code ec = getBuffer(*filePath))
return ec;
OpenPOWER on IntegriCloud