summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/LinkingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/Core/LinkingContext.cpp')
-rw-r--r--lld/lib/Core/LinkingContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/Core/LinkingContext.cpp b/lld/lib/Core/LinkingContext.cpp
index 8a1ef257df1..5cb370a18bd 100644
--- a/lld/lib/Core/LinkingContext.cpp
+++ b/lld/lib/Core/LinkingContext.cpp
@@ -91,7 +91,7 @@ ErrorOr<File &> LinkingContext::nextFile() {
// initialized. Initialize it with the first element of the input graph.
if (_currentInputElement == nullptr) {
ErrorOr<InputElement *> elem = inputGraph().getNextInputElement();
- if (error_code(elem) == InputGraphError::no_more_elements)
+ if (elem.getError() == InputGraphError::no_more_elements)
return make_error_code(InputGraphError::no_more_files);
_currentInputElement = *elem;
}
@@ -102,11 +102,11 @@ ErrorOr<File &> LinkingContext::nextFile() {
// graph.
for (;;) {
ErrorOr<File &> nextFile = _currentInputElement->getNextFile();
- if (error_code(nextFile) != InputGraphError::no_more_files)
+ if (nextFile.getError() != InputGraphError::no_more_files)
return std::move(nextFile);
ErrorOr<InputElement *> elem = inputGraph().getNextInputElement();
- if (error_code(elem) == InputGraphError::no_more_elements ||
+ if (elem.getError() == InputGraphError::no_more_elements ||
*elem == nullptr)
return make_error_code(InputGraphError::no_more_files);
_currentInputElement = *elem;
OpenPOWER on IntegriCloud