diff options
Diffstat (limited to 'lld/lib/Driver/GnuLdInputGraph.cpp')
| -rw-r--r-- | lld/lib/Driver/GnuLdInputGraph.cpp | 8 |
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; |

