summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/include/lld/Driver/WrapperInputGraph.h29
-rw-r--r--lld/lib/Driver/CoreDriver.cpp3
-rw-r--r--lld/lib/Driver/DarwinLdDriver.cpp3
-rw-r--r--lld/lib/Driver/Driver.cpp5
-rw-r--r--lld/lib/Driver/GnuLdDriver.cpp5
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp5
-rw-r--r--lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp9
7 files changed, 12 insertions, 47 deletions
diff --git a/lld/include/lld/Driver/WrapperInputGraph.h b/lld/include/lld/Driver/WrapperInputGraph.h
deleted file mode 100644
index 8003d34454e..00000000000
--- a/lld/include/lld/Driver/WrapperInputGraph.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//===- lld/Driver/WrapperInputGraph.h - dummy InputGraph node -------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_DRIVER_WRAPPER_INPUT_GRAPH_H
-#define LLD_DRIVER_WRAPPER_INPUT_GRAPH_H
-
-#include "lld/Core/InputGraph.h"
-#include "lld/ReaderWriter/CoreLinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "llvm/Support/Errc.h"
-#include <map>
-#include <memory>
-
-namespace lld {
-
-class WrapperNode : public FileNode {
-public:
- WrapperNode(std::unique_ptr<File> f) : FileNode(std::move(f)) {}
-};
-
-}
-
-#endif
diff --git a/lld/lib/Driver/CoreDriver.cpp b/lld/lib/Driver/CoreDriver.cpp
index 1ecd1477761..a694821d0a1 100644
--- a/lld/lib/Driver/CoreDriver.cpp
+++ b/lld/lib/Driver/CoreDriver.cpp
@@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "lld/Driver/Driver.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/ReaderWriter/CoreLinkingContext.h"
#include "lld/ReaderWriter/Reader.h"
#include "llvm/ADT/ArrayRef.h"
@@ -155,7 +154,7 @@ bool CoreDriver::parse(int argc, const char *argv[], CoreLinkingContext &ctx,
= loadFile(ctx, inputArg->getValue(), false);
for (std::unique_ptr<File> &file : files) {
inputGraph->addInputElement(std::unique_ptr<InputElement>(
- new WrapperNode(std::move(file))));
+ new FileNode(std::move(file))));
}
break;
}
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp
index 16958124a0c..494fe5fc4cc 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -17,7 +17,6 @@
#include "lld/Core/ArchiveLibraryFile.h"
#include "lld/Core/SharedLibraryFile.h"
#include "lld/Driver/Driver.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
@@ -121,7 +120,7 @@ static void addFile(StringRef path, std::unique_ptr<InputGraph> &inputGraph,
loadFile(ctx, path, diag, loadWholeArchive, upwardDylib);
for (std::unique_ptr<File> &file : files)
inputGraph->addInputElement(
- llvm::make_unique<WrapperNode>(std::move(file)));
+ llvm::make_unique<FileNode>(std::move(file)));
}
// Export lists are one symbol per line. Blank lines are ignored.
diff --git a/lld/lib/Driver/Driver.cpp b/lld/lib/Driver/Driver.cpp
index 5d9d6807f4a..c21396f1d32 100644
--- a/lld/lib/Driver/Driver.cpp
+++ b/lld/lib/Driver/Driver.cpp
@@ -15,7 +15,6 @@
#include "lld/Core/PassManager.h"
#include "lld/Core/Resolver.h"
#include "lld/Driver/Driver.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/Passes/RoundTripNativePass.h"
#include "lld/Passes/RoundTripYAMLPass.h"
#include "lld/ReaderWriter/Reader.h"
@@ -120,7 +119,7 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) {
context.createInternalFiles(internalFiles);
for (auto i = internalFiles.rbegin(), e = internalFiles.rend(); i != e; ++i) {
context.getInputGraph().addInputElementFront(
- llvm::make_unique<WrapperNode>(std::move(*i)));
+ llvm::make_unique<FileNode>(std::move(*i)));
}
// Give target a chance to add files.
@@ -128,7 +127,7 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) {
context.createImplicitFiles(implicitFiles);
for (auto i = implicitFiles.rbegin(), e = implicitFiles.rend(); i != e; ++i) {
context.getInputGraph().addInputElementFront(
- llvm::make_unique<WrapperNode>(std::move(*i)));
+ llvm::make_unique<FileNode>(std::move(*i)));
}
// Give target a chance to sort the input files.
diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp
index 871c5c9ca7f..283e6581cc2 100644
--- a/lld/lib/Driver/GnuLdDriver.cpp
+++ b/lld/lib/Driver/GnuLdDriver.cpp
@@ -14,7 +14,6 @@
//===----------------------------------------------------------------------===//
#include "lld/Driver/Driver.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/ReaderWriter/ELFLinkingContext.h"
#include "lld/ReaderWriter/LinkerScript.h"
#include "llvm/ADT/ArrayRef.h"
@@ -276,7 +275,7 @@ evaluateLinkerScript(ELFLinkingContext &ctx, InputGraph *inputGraph,
if (ctx.logInputFiles())
diag << file->path() << "\n";
inputGraph->addInputElement(
- std::unique_ptr<InputElement>(new WrapperNode(std::move(file))));
+ std::unique_ptr<InputElement>(new FileNode(std::move(file))));
++numfiles;
}
}
@@ -617,7 +616,7 @@ bool GnuLdDriver::parse(int argc, const char *argv[],
if (ctx->logInputFiles())
diagnostics << file->path() << "\n";
inputGraph->addInputElement(
- std::unique_ptr<InputElement>(new WrapperNode(std::move(file))));
+ std::unique_ptr<InputElement>(new FileNode(std::move(file))));
}
numfiles += files.size();
break;
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 5723ea7dc66..2286e2c037f 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -15,7 +15,6 @@
#include "lld/Driver/Driver.h"
#include "lld/Driver/WinLinkModuleDef.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/ReaderWriter/PECOFFLinkingContext.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
@@ -1418,7 +1417,7 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
return false;
ctx.getResolvableSymsFile()->add(file.get());
ctx.getInputGraph().addInputElement(
- std::unique_ptr<InputElement>(new WrapperNode(std::move(file))));
+ std::unique_ptr<InputElement>(new FileNode(std::move(file))));
}
// Add the library group to the input graph.
@@ -1435,7 +1434,7 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
return false;
ctx.getResolvableSymsFile()->add(file.get());
ctx.addLibraryFile(
- std::unique_ptr<FileNode>(new WrapperNode(std::move(file))));
+ std::unique_ptr<FileNode>(new FileNode(std::move(file))));
}
}
diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
index 5fa53fd7299..24fae0a61a1 100644
--- a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
@@ -17,7 +17,6 @@
#include "PDBPass.h"
#include "lld/Core/PassManager.h"
#include "lld/Core/Simple.h"
-#include "lld/Driver/WrapperInputGraph.h"
#include "lld/Passes/LayoutPass.h"
#include "lld/Passes/RoundTripNativePass.h"
#include "lld/Passes/RoundTripYAMLPass.h"
@@ -110,22 +109,22 @@ bool PECOFFLinkingContext::createImplicitFiles(
pecoff::ResolvableSymbols* syms = getResolvableSymsFile();
// Create a file for the entry point function.
- std::unique_ptr<WrapperNode> entry(new WrapperNode(
+ std::unique_ptr<FileNode> entry(new FileNode(
llvm::make_unique<pecoff::EntryPointFile>(*this, syms)));
getInputGraph().addInputElementFront(std::move(entry));
// Create a file for __ImageBase.
- std::unique_ptr<WrapperNode> fileNode(new WrapperNode(
+ std::unique_ptr<FileNode> fileNode(new FileNode(
llvm::make_unique<pecoff::LinkerGeneratedSymbolFile>(*this)));
getInputGraph().addInputElement(std::move(fileNode));
// Create a file for _imp_ symbols.
- std::unique_ptr<WrapperNode> impFileNode(new WrapperNode(
+ std::unique_ptr<FileNode> impFileNode(new FileNode(
llvm::make_unique<pecoff::LocallyImportedSymbolFile>(*this)));
getInputGraph().addInputElement(std::move(impFileNode));
// Create a file for dllexported symbols.
- std::unique_ptr<WrapperNode> exportNode(new WrapperNode(
+ std::unique_ptr<FileNode> exportNode(new FileNode(
llvm::make_unique<pecoff::ExportedSymbolRenameFile>(*this, syms)));
addLibraryFile(std::move(exportNode));
OpenPOWER on IntegriCloud