diff options
Diffstat (limited to 'lld/lib/Core/LinkingContext.cpp')
-rw-r--r-- | lld/lib/Core/LinkingContext.cpp | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/lld/lib/Core/LinkingContext.cpp b/lld/lib/Core/LinkingContext.cpp index d92ef27968c..7be470404e0 100644 --- a/lld/lib/Core/LinkingContext.cpp +++ b/lld/lib/Core/LinkingContext.cpp @@ -25,8 +25,7 @@ LinkingContext::LinkingContext() _warnIfCoalesableAtomsHaveDifferentLoadName(false), _printRemainingUndefines(true), _allowRemainingUndefines(false), _logInputFiles(false), _allowShlibUndefines(false), - _outputFileType(OutputFileType::Default), _currentInputElement(nullptr), - _nextOrdinal(0) {} + _outputFileType(OutputFileType::Default), _nextOrdinal(0) {} LinkingContext::~LinkingContext() {} @@ -83,37 +82,6 @@ void LinkingContext::createInternalFiles( result.push_back(std::move(internalFile)); } -void LinkingContext::setResolverState(uint32_t state) { - _currentInputElement->setResolveState(state); -} - -ErrorOr<File &> LinkingContext::nextFile() { - // When nextFile() is called for the first time, _currentInputElement is not - // initialized. Initialize it with the first element of the input graph. - if (_currentInputElement == nullptr) { - ErrorOr<InputElement *> elem = inputGraph().getNextInputElement(); - if (elem.getError() == InputGraphError::no_more_elements) - return make_error_code(InputGraphError::no_more_files); - _currentInputElement = *elem; - } - - // Otherwise, try to get the next file of _currentInputElement. If the current - // input element points to an archive file, and there's a file left in the - // archive, it will succeed. If not, try to get the next file in the input - // graph. - for (;;) { - ErrorOr<File &> nextFile = _currentInputElement->getNextFile(); - if (nextFile.getError() != InputGraphError::no_more_files) - return std::move(nextFile); - - ErrorOr<InputElement *> elem = inputGraph().getNextInputElement(); - if (elem.getError() == InputGraphError::no_more_elements || - *elem == nullptr) - return make_error_code(InputGraphError::no_more_files); - _currentInputElement = *elem; - } -} - void LinkingContext::addPasses(PassManager &pm) {} } // end namespace lld |