summaryrefslogtreecommitdiffstats
path: root/lld/lib
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-11-04 17:39:46 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-11-04 17:39:46 +0000
commite568b91510b93140f7449e0b7c04981becb253e4 (patch)
tree99213778842d9dd70cb611108c2e9b30c2ffd0de /lld/lib
parentc35be369621b98168fe9d30c518f13e04576288b (diff)
downloadbcm5719-llvm-e568b91510b93140f7449e0b7c04981becb253e4.tar.gz
bcm5719-llvm-e568b91510b93140f7449e0b7c04981becb253e4.zip
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D26293 llvm-svn: 286000
Diffstat (limited to 'lld/lib')
-rw-r--r--lld/lib/Core/LinkingContext.cpp11
-rw-r--r--lld/lib/Driver/DarwinLdDriver.cpp34
2 files changed, 33 insertions, 12 deletions
diff --git a/lld/lib/Core/LinkingContext.cpp b/lld/lib/Core/LinkingContext.cpp
index 2732543d306..5de863aa7f3 100644
--- a/lld/lib/Core/LinkingContext.cpp
+++ b/lld/lib/Core/LinkingContext.cpp
@@ -8,16 +8,17 @@
//===----------------------------------------------------------------------===//
#include "lld/Core/LinkingContext.h"
-#include "lld/Core/Resolver.h"
+#include "lld/Core/File.h"
+#include "lld/Core/Node.h"
#include "lld/Core/Simple.h"
#include "lld/Core/Writer.h"
-#include "llvm/ADT/Triple.h"
+#include <algorithm>
namespace lld {
-LinkingContext::LinkingContext() {}
+LinkingContext::LinkingContext() = default;
-LinkingContext::~LinkingContext() {}
+LinkingContext::~LinkingContext() = default;
bool LinkingContext::validate(raw_ostream &diagnostics) {
return validateImpl(diagnostics);
@@ -59,7 +60,7 @@ LinkingContext::createUndefinedSymbolFile(StringRef filename) const {
}
void LinkingContext::createInternalFiles(
- std::vector<std::unique_ptr<File> > &result) const {
+ std::vector<std::unique_ptr<File>> &result) const {
if (std::unique_ptr<File> file = createEntrySymbolFile())
result.push_back(std::move(file));
if (std::unique_ptr<File> file = createUndefinedSymbolFile())
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp
index 36cfe8986c4..cb2bef592dc 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -14,24 +14,45 @@
//===----------------------------------------------------------------------===//
#include "lld/Core/ArchiveLibraryFile.h"
+#include "lld/Core/Error.h"
#include "lld/Core/File.h"
#include "lld/Core/Instrumentation.h"
+#include "lld/Core/LLVM.h"
+#include "lld/Core/Node.h"
#include "lld/Core/PassManager.h"
#include "lld/Core/Resolver.h"
#include "lld/Core/SharedLibraryFile.h"
-#include "lld/Driver/Driver.h"
+#include "lld/Core/Simple.h"
+#include "lld/Core/LinkingContext.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/Triple.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/Option/Arg.h"
+#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
+#include "llvm/Option/OptTable.h"
+#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
+#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/Format.h"
+#include "llvm/Support/MachO.h"
+#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
+#include <algorithm>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <system_error>
+#include <utility>
+#include <vector>
using namespace lld;
@@ -116,7 +137,7 @@ loadFile(MachOLinkingContext &ctx, StringRef path,
return files;
}
-} // anonymous namespace
+} // end anonymous namespace
// Test may be running on Windows. Canonicalize the path
// separator to '/' to get consistent outputs for tests.
@@ -166,8 +187,6 @@ static std::error_code parseExportsList(StringRef exportFilePath,
return std::error_code();
}
-
-
/// Order files are one symbol per line. Blank lines are ignored.
/// Trailing comments start with #. Symbol names can be prefixed with an
/// architecture name and/or .o leaf name. Examples:
@@ -1213,5 +1232,6 @@ bool link(llvm::ArrayRef<const char *> args, raw_ostream &diagnostics) {
return true;
}
-} // namespace mach_o
-} // namespace lld
+
+} // end namespace mach_o
+} // end namespace lld
OpenPOWER on IntegriCloud