summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
Diffstat (limited to 'lld')
-rw-r--r--lld/include/lld/Core/Atom.h4
-rw-r--r--lld/include/lld/Core/DefinedAtom.h2
-rw-r--r--lld/include/lld/Core/File.h10
-rw-r--r--lld/include/lld/Core/NativeReader.h1
-rw-r--r--lld/include/lld/Core/Pass.h4
-rw-r--r--lld/include/lld/Core/Platform.h4
-rw-r--r--lld/include/lld/Core/Resolver.h2
-rw-r--r--lld/include/lld/Core/SymbolTable.h9
-rw-r--r--lld/include/lld/Core/YamlReader.h5
-rw-r--r--lld/lib/Core/NativeReader.cpp12
-rw-r--r--lld/lib/Core/NativeWriter.cpp12
-rw-r--r--lld/lib/Core/Resolver.cpp3
-rw-r--r--lld/lib/Core/SymbolTable.cpp14
-rw-r--r--lld/lib/Core/YamlKeyValues.cpp4
-rw-r--r--lld/lib/Core/YamlReader.cpp15
-rw-r--r--lld/lib/Core/YamlWriter.cpp11
-rw-r--r--lld/lib/Passes/GOTPass.cpp2
-rw-r--r--lld/lib/Passes/StubsPass.cpp2
18 files changed, 53 insertions, 63 deletions
diff --git a/lld/include/lld/Core/Atom.h b/lld/include/lld/Core/Atom.h
index e3de6364a95..e1009d85d1b 100644
--- a/lld/include/lld/Core/Atom.h
+++ b/lld/include/lld/Core/Atom.h
@@ -10,7 +10,9 @@
#ifndef LLD_CORE_ATOM_H_
#define LLD_CORE_ATOM_H_
-#include <assert.h>
+#include "llvm/Support/DataTypes.h"
+
+#include <cassert>
namespace llvm {
class StringRef;
diff --git a/lld/include/lld/Core/DefinedAtom.h b/lld/include/lld/Core/DefinedAtom.h
index 2230af3a712..9bdc208d759 100644
--- a/lld/include/lld/Core/DefinedAtom.h
+++ b/lld/include/lld/Core/DefinedAtom.h
@@ -10,8 +10,6 @@
#ifndef LLD_CORE_DEFINED_ATOM_H_
#define LLD_CORE_DEFINED_ATOM_H_
-#include <assert.h>
-
#include "lld/Core/Atom.h"
#include "lld/Core/Reference.h"
diff --git a/lld/include/lld/Core/File.h b/lld/include/lld/Core/File.h
index 375b607f7fa..1bc6c81141e 100644
--- a/lld/include/lld/Core/File.h
+++ b/lld/include/lld/Core/File.h
@@ -10,14 +10,14 @@
#ifndef LLD_CORE_FILE_H_
#define LLD_CORE_FILE_H_
-#include <vector>
+#include "lld/Core/AbsoluteAtom.h"
+#include "lld/Core/DefinedAtom.h"
+#include "lld/Core/SharedLibraryAtom.h"
+#include "lld/Core/UndefinedAtom.h"
#include "llvm/ADT/StringRef.h"
-#include "lld/Core/DefinedAtom.h"
-#include "lld/Core/UndefinedAtom.h"
-#include "lld/Core/SharedLibraryAtom.h"
-#include "lld/Core/AbsoluteAtom.h"
+#include <vector>
namespace lld {
diff --git a/lld/include/lld/Core/NativeReader.h b/lld/include/lld/Core/NativeReader.h
index d13d685e701..7b0f25b0f9e 100644
--- a/lld/include/lld/Core/NativeReader.h
+++ b/lld/include/lld/Core/NativeReader.h
@@ -13,7 +13,6 @@
#include "lld/Core/File.h"
#include "llvm/ADT/OwningPtr.h"
-
#include "llvm/Support/system_error.h"
#include <vector>
diff --git a/lld/include/lld/Core/Pass.h b/lld/include/lld/Core/Pass.h
index 4fcdeec60f7..66f5fe03fe0 100644
--- a/lld/include/lld/Core/Pass.h
+++ b/lld/include/lld/Core/Pass.h
@@ -10,11 +10,11 @@
#ifndef LLD_CORE_PASS_H_
#define LLD_CORE_PASS_H_
-#include <vector>
-
#include "lld/Core/Atom.h"
#include "lld/Core/Platform.h"
+#include <vector>
+
namespace lld {
diff --git a/lld/include/lld/Core/Platform.h b/lld/include/lld/Core/Platform.h
index 7973af88b1b..85bc904d3d1 100644
--- a/lld/include/lld/Core/Platform.h
+++ b/lld/include/lld/Core/Platform.h
@@ -10,10 +10,10 @@
#ifndef LLD_CORE_PLATFORM_H_
#define LLD_CORE_PLATFORM_H_
-#include <vector>
-
#include "lld/Core/Reference.h"
+#include <vector>
+
namespace lld {
class Atom;
class DefinedAtom;
diff --git a/lld/include/lld/Core/Resolver.h b/lld/include/lld/Core/Resolver.h
index 22d667b1ee5..a1af9f45045 100644
--- a/lld/include/lld/Core/Resolver.h
+++ b/lld/include/lld/Core/Resolver.h
@@ -16,8 +16,8 @@
#include "llvm/ADT/DenseSet.h"
-#include <vector>
#include <set>
+#include <vector>
namespace lld {
diff --git a/lld/include/lld/Core/SymbolTable.h b/lld/include/lld/Core/SymbolTable.h
index 4d6fca7aebe..3b4d9300228 100644
--- a/lld/include/lld/Core/SymbolTable.h
+++ b/lld/include/lld/Core/SymbolTable.h
@@ -10,14 +10,13 @@
#ifndef LLD_CORE_SYMBOL_TABLE_H_
#define LLD_CORE_SYMBOL_TABLE_H_
-#include <cstring>
-#include <map>
-#include <vector>
-
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include <cstring>
+#include <map>
+#include <vector>
namespace lld {
diff --git a/lld/include/lld/Core/YamlReader.h b/lld/include/lld/Core/YamlReader.h
index 3ec7ff47bad..b37e9c2389c 100644
--- a/lld/include/lld/Core/YamlReader.h
+++ b/lld/include/lld/Core/YamlReader.h
@@ -14,7 +14,10 @@
#include <vector>
-namespace llvm { class MemoryBuffer; }
+namespace llvm {
+class MemoryBuffer;
+class StringRef;
+}
namespace lld {
diff --git a/lld/lib/Core/NativeReader.cpp b/lld/lib/Core/NativeReader.cpp
index 41a2823c7b8..ffd216c97ec 100644
--- a/lld/lib/Core/NativeReader.cpp
+++ b/lld/lib/Core/NativeReader.cpp
@@ -7,9 +7,11 @@
//
//===----------------------------------------------------------------------===//
-#include <vector>
+#include "NativeFileFormat.h"
-#include <assert.h>
+#include "lld/Core/Atom.h"
+#include "lld/Core/Error.h"
+#include "lld/Core/File.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/OwningPtr.h"
@@ -17,11 +19,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "lld/Core/Error.h"
-#include "lld/Core/File.h"
-#include "lld/Core/Atom.h"
-
-#include "NativeFileFormat.h"
+#include <vector>
namespace lld {
diff --git a/lld/lib/Core/NativeWriter.cpp b/lld/lib/Core/NativeWriter.cpp
index e65573e38d4..5af232640d6 100644
--- a/lld/lib/Core/NativeWriter.cpp
+++ b/lld/lib/Core/NativeWriter.cpp
@@ -7,17 +7,15 @@
//
//===----------------------------------------------------------------------===//
-#include <vector>
+#include "lld/Core/NativeWriter.h"
+#include "NativeFileFormat.h"
+#include "lld/Core/File.h"
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringRef.h"
-#include "lld/Core/File.h"
-#include "lld/Core/NativeWriter.h"
-
-#include "NativeFileFormat.h"
-
+#include <vector>
namespace lld {
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index 62361e002eb..617431eb68d 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -11,15 +11,14 @@
#include "lld/Core/Atom.h"
#include "lld/Core/File.h"
#include "lld/Core/InputFiles.h"
+#include "lld/Core/Platform.h"
#include "lld/Core/SymbolTable.h"
#include "lld/Core/UndefinedAtom.h"
-#include "lld/Platform/Platform.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
-
#include <vector>
namespace lld {
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp
index 4dc86b76250..bec71006faa 100644
--- a/lld/lib/Core/SymbolTable.cpp
+++ b/lld/lib/Core/SymbolTable.cpp
@@ -9,22 +9,22 @@
#include "lld/Core/SymbolTable.h"
#include "lld/Core/Atom.h"
-#include "lld/Core/DefinedAtom.h"
-#include "lld/Core/UndefinedAtom.h"
-#include "lld/Core/SharedLibraryAtom.h"
#include "lld/Core/AbsoluteAtom.h"
+#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
#include "lld/Core/InputFiles.h"
+#include "lld/Core/Platform.h"
#include "lld/Core/Resolver.h"
-#include "lld/Platform/Platform.h"
+#include "lld/Core/SharedLibraryAtom.h"
+#include "lld/Core/UndefinedAtom.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/DenseMapInfo.h"
+#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
-#include <stdlib.h>
+#include <cstdlib>
#include <vector>
namespace lld {
diff --git a/lld/lib/Core/YamlKeyValues.cpp b/lld/lib/Core/YamlKeyValues.cpp
index 99fb95cc1ba..86d2a8cd694 100644
--- a/lld/lib/Core/YamlKeyValues.cpp
+++ b/lld/lib/Core/YamlKeyValues.cpp
@@ -7,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
-#include <string.h>
-
#include "YamlKeyValues.h"
#include "llvm/Support/ErrorHandling.h"
+#include <cstring>
+
namespace lld {
namespace yaml {
diff --git a/lld/lib/Core/YamlReader.cpp b/lld/lib/Core/YamlReader.cpp
index b02f381c2cf..c4c826d6f6e 100644
--- a/lld/lib/Core/YamlReader.cpp
+++ b/lld/lib/Core/YamlReader.cpp
@@ -7,30 +7,27 @@
//
//===----------------------------------------------------------------------===//
-#include <string.h>
-
-#include "YamlKeyValues.h"
-
#include "lld/Core/YamlReader.h"
+#include "YamlKeyValues.h"
#include "lld/Core/Atom.h"
-#include "lld/Core/UndefinedAtom.h"
-#include "lld/Core/SharedLibraryAtom.h"
#include "lld/Core/AbsoluteAtom.h"
#include "lld/Core/Error.h"
#include "lld/Core/File.h"
+#include "lld/Core/Platform.h"
#include "lld/Core/Reference.h"
-
-#include "lld/Platform/Platform.h"
+#include "lld/Core/SharedLibraryAtom.h"
+#include "lld/Core/UndefinedAtom.h"
#include "llvm/ADT/APInt.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/system_error.h"
+#include <cstring>
#include <vector>
diff --git a/lld/lib/Core/YamlWriter.cpp b/lld/lib/Core/YamlWriter.cpp
index bd253b42506..7f9b0c3170e 100644
--- a/lld/lib/Core/YamlWriter.cpp
+++ b/lld/lib/Core/YamlWriter.cpp
@@ -7,21 +7,18 @@
//
//===----------------------------------------------------------------------===//
-#include "YamlKeyValues.h"
-
#include "lld/Core/YamlWriter.h"
+#include "YamlKeyValues.h"
#include "lld/Core/Atom.h"
#include "lld/Core/File.h"
+#include "lld/Core/Platform.h"
#include "lld/Core/Reference.h"
-#include "lld/Platform/Platform.h"
-
-#include "llvm/ADT/OwningPtr.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/lld/lib/Passes/GOTPass.cpp b/lld/lib/Passes/GOTPass.cpp
index 5152b94f317..4cb5ce16db3 100644
--- a/lld/lib/Passes/GOTPass.cpp
+++ b/lld/lib/Passes/GOTPass.cpp
@@ -6,7 +6,6 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-
//
// This linker pass transforms all GOT kind references to real references.
// That is, in assembly you can write something like:
@@ -30,6 +29,7 @@
// LEA instruction that is the same size. The platform method isGOTAccess()
// should only return true for "canBypassGOT" if this optimization is supported.
//
+//===----------------------------------------------------------------------===//
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
diff --git a/lld/lib/Passes/StubsPass.cpp b/lld/lib/Passes/StubsPass.cpp
index ca79394cc90..0026074698d 100644
--- a/lld/lib/Passes/StubsPass.cpp
+++ b/lld/lib/Passes/StubsPass.cpp
@@ -6,13 +6,13 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-
//
// This linker pass updates call sites which have references to shared library
// atoms to instead have a reference to a stub (PLT entry) for the specified
// symbol. The platform object does the work of creating the platform-specific
// StubAtom.
//
+//===----------------------------------------------------------------------===//
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
OpenPOWER on IntegriCloud