diff --git a/lld/include/lld/Driver/CoreInputGraph.h b/lld/include/lld/Driver/CoreInputGraph.h index fa50a5e0ef63..b2581a343514 100644 --- a/lld/include/lld/Driver/CoreInputGraph.h +++ b/lld/include/lld/Driver/CoreInputGraph.h @@ -42,7 +42,7 @@ public: /// \brief Parse the input file to lld::File. llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { - auto filePath = path(ctx); + ErrorOr filePath = path(ctx); if (!filePath && error_code(filePath) == llvm::errc::no_such_file_or_directory) return make_error_code(llvm::errc::no_such_file_or_directory); diff --git a/lld/include/lld/Driver/DarwinInputGraph.h b/lld/include/lld/Driver/DarwinInputGraph.h index 6b8ecb39b072..06ccf1687fdc 100644 --- a/lld/include/lld/Driver/DarwinInputGraph.h +++ b/lld/include/lld/Driver/DarwinInputGraph.h @@ -42,7 +42,7 @@ public: /// \brief Parse the input file to lld::File. llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { - auto filePath = path(ctx); + ErrorOr filePath = path(ctx); if (!filePath && error_code(filePath) == llvm::errc::no_such_file_or_directory) return make_error_code(llvm::errc::no_such_file_or_directory); diff --git a/lld/include/lld/Driver/GnuLdInputGraph.h b/lld/include/lld/Driver/GnuLdInputGraph.h index a0b9c48f92dc..cab3030f4420 100644 --- a/lld/include/lld/Driver/GnuLdInputGraph.h +++ b/lld/include/lld/Driver/GnuLdInputGraph.h @@ -72,7 +72,7 @@ public: /// \brief Parse the input file to lld::File. llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { - auto filePath = path(ctx); + ErrorOr filePath = path(ctx); if (!filePath && error_code(filePath) == llvm::errc::no_such_file_or_directory) return make_error_code(llvm::errc::no_such_file_or_directory); diff --git a/lld/include/lld/Driver/WinLinkInputGraph.h b/lld/include/lld/Driver/WinLinkInputGraph.h index 3272b159d98d..a1df5835a396 100644 --- a/lld/include/lld/Driver/WinLinkInputGraph.h +++ b/lld/include/lld/Driver/WinLinkInputGraph.h @@ -39,7 +39,7 @@ public: /// \brief Parse the input file to lld::File. llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) { - auto filePath = path(ctx); + ErrorOr filePath = path(ctx); if (!filePath && error_code(filePath) == llvm::errc::no_such_file_or_directory) return make_error_code(llvm::errc::no_such_file_or_directory);