summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/LinkingContext.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/Core/LinkingContext.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/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