diff options
Diffstat (limited to 'lld/lib')
| -rw-r--r-- | lld/lib/Core/InputGraph.cpp | 6 | ||||
| -rw-r--r-- | lld/lib/Core/Resolver.cpp | 11 | ||||
| -rw-r--r-- | lld/lib/Driver/Driver.cpp | 6 | ||||
| -rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 6 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp | 3 |
5 files changed, 16 insertions, 16 deletions
diff --git a/lld/lib/Core/InputGraph.cpp b/lld/lib/Core/InputGraph.cpp index 730a958158e..39d2b193b7c 100644 --- a/lld/lib/Core/InputGraph.cpp +++ b/lld/lib/Core/InputGraph.cpp @@ -15,9 +15,9 @@ using namespace lld; -ErrorOr<File &> InputGraph::nextFile() { - // When nextFile() is called for the first time, _currentInputElement is not - // initialized. Initialize it with the first element of the input graph. +ErrorOr<File &> InputGraph::getNextFile() { + // When getNextFile() 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 = getNextInputElement(); if (elem.getError() == InputGraphError::no_more_elements) diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp index 69688fe78ff..1b40bd37dcc 100644 --- a/lld/lib/Core/Resolver.cpp +++ b/lld/lib/Core/Resolver.cpp @@ -65,7 +65,7 @@ void Resolver::handleFile(const File &file) { // Notify the input file manager of the fact that we have made some progress // on linking using the current input file. It may want to know the fact for // --start-group/--end-group. - _context.inputGraph().notifyProgress(); + _context.getInputGraph().notifyProgress(); } void Resolver::forEachUndefines(UndefCallback callback, @@ -260,19 +260,18 @@ void Resolver::addAtoms(const std::vector<const DefinedAtom *> &newAtoms) { doDefinedAtom(*newAtom); } -// Keep adding atoms until _context.nextFile() returns an error. This function -// is where undefined atoms are resolved. +// Keep adding atoms until _context.getNextFile() returns an error. This +// function is where undefined atoms are resolved. bool Resolver::resolveUndefines() { ScopedTask task(getDefaultDomain(), "resolveUndefines"); for (;;) { - ErrorOr<File &> file = _context.inputGraph().nextFile(); + ErrorOr<File &> file = _context.getInputGraph().getNextFile(); error_code ec = file.getError(); if (ec == InputGraphError::no_more_files) return true; if (!file) { - llvm::errs() << "Error occurred in nextFile: " - << ec.message() << "\n"; + llvm::errs() << "Error occurred in getNextFile: " << ec.message() << "\n"; return false; } diff --git a/lld/lib/Driver/Driver.cpp b/lld/lib/Driver/Driver.cpp index 0e05725f1e7..1122ae9bc54 100644 --- a/lld/lib/Driver/Driver.cpp +++ b/lld/lib/Driver/Driver.cpp @@ -44,7 +44,7 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) { args[numArgs + 1] = 0; llvm::cl::ParseCommandLineOptions(numArgs + 1, args); } - InputGraph &inputGraph = context.inputGraph(); + InputGraph &inputGraph = context.getInputGraph(); if (!inputGraph.size()) return false; @@ -95,8 +95,8 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) { context.createImplicitFiles(implicitFiles); if (implicitFiles.size()) fileNode->addFiles(std::move(implicitFiles)); - context.inputGraph().insertElementAt(std::move(fileNode), - InputGraph::Position::BEGIN); + context.getInputGraph().insertElementAt(std::move(fileNode), + InputGraph::Position::BEGIN); // Do core linking. ScopedTask resolveTask(getDefaultDomain(), "Resolve"); diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index 2ab1a7f6a94..8ae776b39af 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -531,7 +531,7 @@ static bool createManifest(PECOFFLinkingContext &ctx, raw_ostream &diag) { return false; std::unique_ptr<InputElement> inputElement( new PECOFFFileNode(ctx, ctx.allocate(resourceFilePath))); - ctx.inputGraph().addInputElement(std::move(inputElement)); + ctx.getInputGraph().addInputElement(std::move(inputElement)); return true; } return createSideBySideManifestFile(ctx, diag); @@ -1241,14 +1241,14 @@ bool WinLinkDriver::parse(int argc, const char *argv[], if (isReadingDirectiveSection) if (file->parse(ctx, diag)) return false; - ctx.inputGraph().addInputElement(std::move(file)); + ctx.getInputGraph().addInputElement(std::move(file)); } // Add the library group to the input graph. if (!isReadingDirectiveSection) { auto group = std::unique_ptr<Group>(new PECOFFGroup(ctx)); ctx.setLibraryGroup(group.get()); - ctx.inputGraph().addInputElement(std::move(group)); + ctx.getInputGraph().addInputElement(std::move(group)); } // Add the library files to the library group. diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp index 780dc233230..404f24d9ff6 100644 --- a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +++ b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp @@ -108,7 +108,8 @@ bool PECOFFLinkingContext::createImplicitFiles( std::unique_ptr<File> linkerGeneratedSymFile( new pecoff::LinkerGeneratedSymbolFile(*this)); fileNode->appendInputFile(std::move(linkerGeneratedSymFile)); - inputGraph().insertElementAt(std::move(fileNode), InputGraph::Position::END); + getInputGraph().insertElementAt(std::move(fileNode), + InputGraph::Position::END); return true; } |

