summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-10-02 21:00:41 +0000
committerRui Ueyama <ruiu@google.com>2017-10-02 21:00:41 +0000
commit3f851704c154b8ab045b5cd58d31ce854b9c6599 (patch)
treec0ec0a73ce767fcafa800c49494935ef986be7e7
parente2ff2ba57d64a740095737866f0787e6f2c1e410 (diff)
downloadbcm5719-llvm-3f851704c154b8ab045b5cd58d31ce854b9c6599.tar.gz
bcm5719-llvm-3f851704c154b8ab045b5cd58d31ce854b9c6599.zip
Move new lld's code to Common subdirectory.
New lld's files are spread under lib subdirectory, and it isn't easy to find which files are actually maintained. This patch moves maintained files to Common subdirectory. Differential Revision: https://reviews.llvm.org/D37645 llvm-svn: 314719
-rw-r--r--lld/CMakeLists.txt5
-rw-r--r--lld/COFF/CMakeLists.txt1
-rw-r--r--lld/COFF/Chunks.h2
-rw-r--r--lld/COFF/Driver.cpp2
-rw-r--r--lld/COFF/Driver.h4
-rw-r--r--lld/COFF/Error.h2
-rw-r--r--lld/COFF/InputFiles.h2
-rw-r--r--lld/COFF/LTO.cpp2
-rw-r--r--lld/COFF/LTO.h2
-rw-r--r--lld/COFF/Symbols.h2
-rw-r--r--lld/Common/CMakeLists.txt12
-rw-r--r--lld/Common/Reproduce.cpp (renamed from lld/lib/Core/Reproduce.cpp)2
-rw-r--r--lld/Common/TargetOptionsCommandFlags.cpp (renamed from lld/lib/Core/TargetOptionsCommandFlags.cpp)2
-rw-r--r--lld/Common/Version.cpp (renamed from lld/lib/Config/Version.cpp)4
-rw-r--r--lld/ELF/CMakeLists.txt1
-rw-r--r--lld/ELF/Driver.cpp4
-rw-r--r--lld/ELF/Driver.h4
-rw-r--r--lld/ELF/DriverUtils.cpp4
-rw-r--r--lld/ELF/EhFrame.h2
-rw-r--r--lld/ELF/Error.h2
-rw-r--r--lld/ELF/Filesystem.h2
-rw-r--r--lld/ELF/InputFiles.h4
-rw-r--r--lld/ELF/InputSection.h2
-rw-r--r--lld/ELF/LTO.cpp4
-rw-r--r--lld/ELF/LTO.h2
-rw-r--r--lld/ELF/LinkerScript.h2
-rw-r--r--lld/ELF/OutputSections.h2
-rw-r--r--lld/ELF/Relocations.h2
-rw-r--r--lld/ELF/ScriptLexer.h2
-rw-r--r--lld/ELF/ScriptParser.h2
-rw-r--r--lld/ELF/Strings.h2
-rw-r--r--lld/ELF/Symbols.h2
-rw-r--r--lld/ELF/SyntheticSections.cpp2
-rw-r--r--lld/docs/Driver.rst2
-rw-r--r--lld/include/lld/Common/Driver.h (renamed from lld/include/lld/Driver/Driver.h)6
-rw-r--r--lld/include/lld/Common/LLVM.h (renamed from lld/include/lld/Core/LLVM.h)4
-rw-r--r--lld/include/lld/Common/Reproduce.h (renamed from lld/include/lld/Core/Reproduce.h)6
-rw-r--r--lld/include/lld/Common/TargetOptionsCommandFlags.h (renamed from lld/include/lld/Core/TargetOptionsCommandFlags.h)0
-rw-r--r--lld/include/lld/Common/Version.h (renamed from lld/include/lld/Config/Version.h)4
-rw-r--r--lld/include/lld/Common/Version.inc.in (renamed from lld/include/lld/Config/Version.inc.in)0
-rw-r--r--lld/include/lld/Core/Atom.h2
-rw-r--r--lld/include/lld/Core/DefinedAtom.h2
-rw-r--r--lld/include/lld/Core/Error.h2
-rw-r--r--lld/include/lld/Core/PassManager.h2
-rw-r--r--lld/include/lld/Core/Reader.h2
-rw-r--r--lld/include/lld/Core/SymbolTable.h2
-rw-r--r--lld/include/lld/Core/Writer.h2
-rw-r--r--lld/include/lld/ReaderWriter/YamlContext.h2
-rw-r--r--lld/lib/CMakeLists.txt1
-rw-r--r--lld/lib/Config/CMakeLists.txt9
-rw-r--r--lld/lib/Core/CMakeLists.txt2
-rw-r--r--lld/lib/Core/Resolver.cpp6
-rw-r--r--lld/lib/Core/SymbolTable.cpp2
-rw-r--r--lld/lib/Driver/DarwinLdDriver.cpp2
-rw-r--r--lld/lib/ReaderWriter/FileArchive.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/ArchHandler.h2
-rw-r--r--lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/GOTPass.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFile.h2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/ObjCPass.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/ShimPass.cpp2
-rw-r--r--lld/lib/ReaderWriter/MachO/StubsPass.cpp2
-rw-r--r--lld/tools/lld/lld.cpp2
-rw-r--r--lld/unittests/DriverTests/DarwinLdDriverTest.cpp2
71 files changed, 94 insertions, 91 deletions
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 1893e6bcebf..b87b95a3391 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -160,8 +160,8 @@ endif ()
# Configure the Version.inc file.
configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/include/lld/Config/Version.inc.in
- ${CMAKE_CURRENT_BINARY_DIR}/include/lld/Config/Version.inc)
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/lld/Common/Version.inc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/include/lld/Common/Version.inc)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
@@ -210,6 +210,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
)
endif()
+add_subdirectory(Common)
add_subdirectory(lib)
add_subdirectory(tools/lld)
diff --git a/lld/COFF/CMakeLists.txt b/lld/COFF/CMakeLists.txt
index c3f7d7ff537..4f7659e7a2c 100644
--- a/lld/COFF/CMakeLists.txt
+++ b/lld/COFF/CMakeLists.txt
@@ -42,6 +42,7 @@ add_lld_library(lldCOFF
WindowsManifest
LINK_LIBS
+ lldCommon
lldCore
${LLVM_PTHREAD_LIB}
diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h
index f0368331b2d..e93737399bb 100644
--- a/lld/COFF/Chunks.h
+++ b/lld/COFF/Chunks.h
@@ -12,7 +12,7 @@
#include "Config.h"
#include "InputFiles.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index a28b32a6458..28968aac684 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -15,7 +15,7 @@
#include "SymbolTable.h"
#include "Symbols.h"
#include "Writer.h"
-#include "lld/Driver/Driver.h"
+#include "lld/Common/Driver.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/Magic.h"
diff --git a/lld/COFF/Driver.h b/lld/COFF/Driver.h
index de6f025bc79..f576c05ce2b 100644
--- a/lld/COFF/Driver.h
+++ b/lld/COFF/Driver.h
@@ -12,8 +12,8 @@
#include "Config.h"
#include "SymbolTable.h"
-#include "lld/Core/LLVM.h"
-#include "lld/Core/Reproduce.h"
+#include "lld/Common/LLVM.h"
+#include "lld/Common/Reproduce.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/Archive.h"
diff --git a/lld/COFF/Error.h b/lld/COFF/Error.h
index e1e4c1e5216..1cc2dd4ed90 100644
--- a/lld/COFF/Error.h
+++ b/lld/COFF/Error.h
@@ -10,7 +10,7 @@
#ifndef LLD_COFF_ERROR_H
#define LLD_COFF_ERROR_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/Support/Error.h"
namespace lld {
diff --git a/lld/COFF/InputFiles.h b/lld/COFF/InputFiles.h
index 843f784b58c..aa1a0e1dd3a 100644
--- a/lld/COFF/InputFiles.h
+++ b/lld/COFF/InputFiles.h
@@ -11,7 +11,7 @@
#define LLD_COFF_INPUT_FILES_H
#include "Config.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/LTO/LTO.h"
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp
index 33bda83b4b8..4a55b25a9e6 100644
--- a/lld/COFF/LTO.cpp
+++ b/lld/COFF/LTO.cpp
@@ -12,7 +12,7 @@
#include "Error.h"
#include "InputFiles.h"
#include "Symbols.h"
-#include "lld/Core/TargetOptionsCommandFlags.h"
+#include "lld/Common/TargetOptionsCommandFlags.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/COFF/LTO.h b/lld/COFF/LTO.h
index a98dc761f35..a444aa7ac4f 100644
--- a/lld/COFF/LTO.h
+++ b/lld/COFF/LTO.h
@@ -21,7 +21,7 @@
#ifndef LLD_COFF_LTO_H
#define LLD_COFF_LTO_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/SmallString.h"
#include <memory>
#include <vector>
diff --git a/lld/COFF/Symbols.h b/lld/COFF/Symbols.h
index 4db3824bc84..4042b4eefdc 100644
--- a/lld/COFF/Symbols.h
+++ b/lld/COFF/Symbols.h
@@ -13,7 +13,7 @@
#include "Chunks.h"
#include "Config.h"
#include "Memory.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/COFF.h"
diff --git a/lld/Common/CMakeLists.txt b/lld/Common/CMakeLists.txt
new file mode 100644
index 00000000000..49dea068642
--- /dev/null
+++ b/lld/Common/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_lld_library(lldCommon
+ Reproduce.cpp
+ TargetOptionsCommandFlags.cpp
+ Version.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLD_INCLUDE_DIR}/lld/Common
+
+ LINK_COMPONENTS
+ Option
+ Support
+ )
diff --git a/lld/lib/Core/Reproduce.cpp b/lld/Common/Reproduce.cpp
index 6295e628bcd..1e3dabaea0c 100644
--- a/lld/lib/Core/Reproduce.cpp
+++ b/lld/Common/Reproduce.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/Core/Reproduce.h"
+#include "lld/Common/Reproduce.h"
#include "llvm/Option/Arg.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
diff --git a/lld/lib/Core/TargetOptionsCommandFlags.cpp b/lld/Common/TargetOptionsCommandFlags.cpp
index 333c283fae8..0115ee2b43e 100644
--- a/lld/lib/Core/TargetOptionsCommandFlags.cpp
+++ b/lld/Common/TargetOptionsCommandFlags.cpp
@@ -14,7 +14,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/Core/TargetOptionsCommandFlags.h"
+#include "lld/Common/TargetOptionsCommandFlags.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/Target/TargetOptions.h"
diff --git a/lld/lib/Config/Version.cpp b/lld/Common/Version.cpp
index 25544756f8b..6226c9a2fac 100644
--- a/lld/lib/Config/Version.cpp
+++ b/lld/Common/Version.cpp
@@ -1,4 +1,4 @@
-//===- lib/Config/Version.cpp - LLD Version Number ---------------*- C++-=====//
+//===- lib/Common/Version.cpp - LLD Version Number ---------------*- C++-=====//
//
// The LLVM Compiler Infrastructure
//
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/Config/Version.h"
+#include "lld/Common/Version.h"
using namespace llvm;
diff --git a/lld/ELF/CMakeLists.txt b/lld/ELF/CMakeLists.txt
index 77243bd494d..04fe9f8fad6 100644
--- a/lld/ELF/CMakeLists.txt
+++ b/lld/ELF/CMakeLists.txt
@@ -65,6 +65,7 @@ add_lld_library(lldELF
TransformUtils
LINK_LIBS
+ lldCommon
lldConfig
lldCore
${LLVM_PTHREAD_LIB}
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index b53d88ba353..13cdf333266 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -40,8 +40,8 @@
#include "Target.h"
#include "Threads.h"
#include "Writer.h"
-#include "lld/Config/Version.h"
-#include "lld/Driver/Driver.h"
+#include "lld/Common/Driver.h"
+#include "lld/Common/Version.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/CommandLine.h"
diff --git a/lld/ELF/Driver.h b/lld/ELF/Driver.h
index 076dda7730a..617dcb2001b 100644
--- a/lld/ELF/Driver.h
+++ b/lld/ELF/Driver.h
@@ -11,8 +11,8 @@
#define LLD_ELF_DRIVER_H
#include "SymbolTable.h"
-#include "lld/Core/LLVM.h"
-#include "lld/Core/Reproduce.h"
+#include "lld/Common/LLVM.h"
+#include "lld/Common/Reproduce.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index cfadd2959c1..0af56c301f5 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -16,8 +16,8 @@
#include "Driver.h"
#include "Error.h"
#include "Memory.h"
-#include "lld/Config/Version.h"
-#include "lld/Core/Reproduce.h"
+#include "lld/Common/Reproduce.h"
+#include "lld/Common/Version.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Triple.h"
diff --git a/lld/ELF/EhFrame.h b/lld/ELF/EhFrame.h
index 07d1aaa3cbb..25ed2b9198b 100644
--- a/lld/ELF/EhFrame.h
+++ b/lld/ELF/EhFrame.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_EHFRAME_H
#define LLD_ELF_EHFRAME_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
namespace lld {
namespace elf {
diff --git a/lld/ELF/Error.h b/lld/ELF/Error.h
index 89bc2111b44..c6e4f0e62d1 100644
--- a/lld/ELF/Error.h
+++ b/lld/ELF/Error.h
@@ -28,7 +28,7 @@
#ifndef LLD_ELF_ERROR_H
#define LLD_ELF_ERROR_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/Support/Error.h"
diff --git a/lld/ELF/Filesystem.h b/lld/ELF/Filesystem.h
index dbeadac5a96..cf170b7166e 100644
--- a/lld/ELF/Filesystem.h
+++ b/lld/ELF/Filesystem.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_FILESYSTEM_H
#define LLD_ELF_FILESYSTEM_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
namespace lld {
namespace elf {
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 5a1f6d6a6df..39856de9cd6 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -15,8 +15,8 @@
#include "InputSection.h"
#include "Symbols.h"
-#include "lld/Core/LLVM.h"
-#include "lld/Core/Reproduce.h"
+#include "lld/Common/LLVM.h"
+#include "lld/Common/Reproduce.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index de78b8f3ca4..3ed4313f0d5 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -13,7 +13,7 @@
#include "Config.h"
#include "Relocations.h"
#include "Thunks.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/TinyPtrVector.h"
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 24a8ff65b91..925c3ec1ebd 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -10,11 +10,11 @@
#include "LTO.h"
#include "Config.h"
#include "Error.h"
-#include "LinkerScript.h"
#include "InputFiles.h"
+#include "LinkerScript.h"
#include "SymbolTable.h"
#include "Symbols.h"
-#include "lld/Core/TargetOptionsCommandFlags.h"
+#include "lld/Common/TargetOptionsCommandFlags.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/ELF/LTO.h b/lld/ELF/LTO.h
index 79dd232909a..223af507a97 100644
--- a/lld/ELF/LTO.h
+++ b/lld/ELF/LTO.h
@@ -21,7 +21,7 @@
#ifndef LLD_ELF_LTO_H
#define LLD_ELF_LTO_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallString.h"
#include <memory>
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 921bff05245..d158f62aa58 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -13,7 +13,7 @@
#include "Config.h"
#include "Strings.h"
#include "Writer.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h
index bf970db7cd0..948ab8de3f1 100644
--- a/lld/ELF/OutputSections.h
+++ b/lld/ELF/OutputSections.h
@@ -15,7 +15,7 @@
#include "LinkerScript.h"
#include "Relocations.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Object/ELF.h"
diff --git a/lld/ELF/Relocations.h b/lld/ELF/Relocations.h
index 9035e033352..7984424d78a 100644
--- a/lld/ELF/Relocations.h
+++ b/lld/ELF/Relocations.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_RELOCATIONS_H
#define LLD_ELF_RELOCATIONS_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/DenseMap.h"
#include <map>
#include <vector>
diff --git a/lld/ELF/ScriptLexer.h b/lld/ELF/ScriptLexer.h
index da0a5e96236..e7c8b28e49f 100644
--- a/lld/ELF/ScriptLexer.h
+++ b/lld/ELF/ScriptLexer.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_SCRIPT_LEXER_H
#define LLD_ELF_SCRIPT_LEXER_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/MemoryBuffer.h"
#include <utility>
diff --git a/lld/ELF/ScriptParser.h b/lld/ELF/ScriptParser.h
index 02f3a2bd9d2..f820044cc58 100644
--- a/lld/ELF/ScriptParser.h
+++ b/lld/ELF/ScriptParser.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_SCRIPT_PARSER_H
#define LLD_ELF_SCRIPT_PARSER_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/Support/MemoryBuffer.h"
namespace lld {
diff --git a/lld/ELF/Strings.h b/lld/ELF/Strings.h
index aba1267b642..aef9a92c013 100644
--- a/lld/ELF/Strings.h
+++ b/lld/ELF/Strings.h
@@ -10,7 +10,7 @@
#ifndef LLD_ELF_STRINGS_H
#define LLD_ELF_STRINGS_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/Optional.h"
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 6c95968c8ca..6992679e05b 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -18,7 +18,7 @@
#include "InputSection.h"
#include "Strings.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ELF.h"
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 591039549cc..648fe3470c6 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -26,7 +26,7 @@
#include "Target.h"
#include "Threads.h"
#include "Writer.h"
-#include "lld/Config/Version.h"
+#include "lld/Common/Version.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h"
#include "llvm/Object/Decompressor.h"
diff --git a/lld/docs/Driver.rst b/lld/docs/Driver.rst
index 27b378712a6..4ee6ce0c985 100644
--- a/lld/docs/Driver.rst
+++ b/lld/docs/Driver.rst
@@ -65,7 +65,7 @@ Adding an Option to an existing Flavor
Adding a Flavor
===============
-#. Add an entry for the flavor in :file:`include/lld/Driver/Driver.h` to
+#. Add an entry for the flavor in :file:`include/lld/Common/Driver.h` to
:cpp:class:`lld::UniversalDriver::Flavor`.
#. Add an entry in :file:`lib/Driver/UniversalDriver.cpp` to
diff --git a/lld/include/lld/Driver/Driver.h b/lld/include/lld/Common/Driver.h
index 655fcfef2ef..b3fa4712816 100644
--- a/lld/include/lld/Driver/Driver.h
+++ b/lld/include/lld/Common/Driver.h
@@ -1,4 +1,4 @@
-//===- lld/Driver/Driver.h - Linker Driver Emulator -----------------------===//
+//===- lld/Common/Driver.h - Linker Driver Emulator -----------------------===//
//
// The LLVM Linker
//
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLD_DRIVER_DRIVER_H
-#define LLD_DRIVER_DRIVER_H
+#ifndef LLD_COMMON_DRIVER_H
+#define LLD_COMMON_DRIVER_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lld/include/lld/Core/LLVM.h b/lld/include/lld/Common/LLVM.h
index ccf08859f4a..b5d0e2bffb0 100644
--- a/lld/include/lld/Core/LLVM.h
+++ b/lld/include/lld/Common/LLVM.h
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLD_CORE_LLVM_H
-#define LLD_CORE_LLVM_H
+#ifndef LLD_COMMON_LLVM_H
+#define LLD_COMMON_LLVM_H
// This should be the only #include, force #includes of all the others on
// clients.
diff --git a/lld/include/lld/Core/Reproduce.h b/lld/include/lld/Common/Reproduce.h
index 6e1d36a5491..9cc430e5185 100644
--- a/lld/include/lld/Core/Reproduce.h
+++ b/lld/include/lld/Common/Reproduce.h
@@ -7,10 +7,10 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLD_CORE_REPRODUCE_H
-#define LLD_CORE_REPRODUCE_H
+#ifndef LLD_COMMON_REPRODUCE_H
+#define LLD_COMMON_REPRODUCE_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
diff --git a/lld/include/lld/Core/TargetOptionsCommandFlags.h b/lld/include/lld/Common/TargetOptionsCommandFlags.h
index 9c4ff7cea3f..9c4ff7cea3f 100644
--- a/lld/include/lld/Core/TargetOptionsCommandFlags.h
+++ b/lld/include/lld/Common/TargetOptionsCommandFlags.h
diff --git a/lld/include/lld/Config/Version.h b/lld/include/lld/Common/Version.h
index 1cec3cc7678..93de77df580 100644
--- a/lld/include/lld/Config/Version.h
+++ b/lld/include/lld/Common/Version.h
@@ -1,4 +1,4 @@
-//===- lld/Config/Version.h - LLD Version Number ----------------*- C++ -*-===//
+//===- lld/Common/Version.h - LLD Version Number ----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,7 +14,7 @@
#ifndef LLD_VERSION_H
#define LLD_VERSION_H
-#include "lld/Config/Version.inc"
+#include "lld/Common/Version.inc"
#include "llvm/ADT/StringRef.h"
namespace lld {
diff --git a/lld/include/lld/Config/Version.inc.in b/lld/include/lld/Common/Version.inc.in
index 2789a5c4608..2789a5c4608 100644
--- a/lld/include/lld/Config/Version.inc.in
+++ b/lld/include/lld/Common/Version.inc.in
diff --git a/lld/include/lld/Core/Atom.h b/lld/include/lld/Core/Atom.h
index 156a5d4a736..149c3d5ee2c 100644
--- a/lld/include/lld/Core/Atom.h
+++ b/lld/include/lld/Core/Atom.h
@@ -10,7 +10,7 @@
#ifndef LLD_CORE_ATOM_H
#define LLD_CORE_ATOM_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/StringRef.h"
namespace lld {
diff --git a/lld/include/lld/Core/DefinedAtom.h b/lld/include/lld/Core/DefinedAtom.h
index 7f623d2ea5e..6229d67e25a 100644
--- a/lld/include/lld/Core/DefinedAtom.h
+++ b/lld/include/lld/Core/DefinedAtom.h
@@ -10,9 +10,9 @@
#ifndef LLD_CORE_DEFINED_ATOM_H
#define LLD_CORE_DEFINED_ATOM_H
+#include "lld/Common/LLVM.h"
#include "lld/Core/Atom.h"
#include "lld/Core/Reference.h"
-#include "lld/Core/LLVM.h"
#include "llvm/Support/ErrorHandling.h"
namespace lld {
diff --git a/lld/include/lld/Core/Error.h b/lld/include/lld/Core/Error.h
index b0bf73b1cb7..36a36724987 100644
--- a/lld/include/lld/Core/Error.h
+++ b/lld/include/lld/Core/Error.h
@@ -14,7 +14,7 @@
#ifndef LLD_CORE_ERROR_H
#define LLD_CORE_ERROR_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include <system_error>
diff --git a/lld/include/lld/Core/PassManager.h b/lld/include/lld/Core/PassManager.h
index 09b417a2985..2ea65ae13ac 100644
--- a/lld/include/lld/Core/PassManager.h
+++ b/lld/include/lld/Core/PassManager.h
@@ -10,7 +10,7 @@
#ifndef LLD_CORE_PASS_MANAGER_H
#define LLD_CORE_PASS_MANAGER_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Pass.h"
#include "llvm/Support/Error.h"
#include <memory>
diff --git a/lld/include/lld/Core/Reader.h b/lld/include/lld/Core/Reader.h
index 32d04249f37..c7baf86af61 100644
--- a/lld/include/lld/Core/Reader.h
+++ b/lld/include/lld/Core/Reader.h
@@ -10,7 +10,7 @@
#ifndef LLD_CORE_READER_H
#define LLD_CORE_READER_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Reference.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Magic.h"
diff --git a/lld/include/lld/Core/SymbolTable.h b/lld/include/lld/Core/SymbolTable.h
index ba4951e5bd1..9c39a6ed507 100644
--- a/lld/include/lld/Core/SymbolTable.h
+++ b/lld/include/lld/Core/SymbolTable.h
@@ -10,7 +10,7 @@
#ifndef LLD_CORE_SYMBOL_TABLE_H
#define LLD_CORE_SYMBOL_TABLE_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringExtras.h"
#include <cstring>
diff --git a/lld/include/lld/Core/Writer.h b/lld/include/lld/Core/Writer.h
index 216f934916b..1f0ca4cda41 100644
--- a/lld/include/lld/Core/Writer.h
+++ b/lld/include/lld/Core/Writer.h
@@ -10,7 +10,7 @@
#ifndef LLD_CORE_WRITER_H
#define LLD_CORE_WRITER_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "llvm/Support/Error.h"
#include <memory>
#include <vector>
diff --git a/lld/include/lld/ReaderWriter/YamlContext.h b/lld/include/lld/ReaderWriter/YamlContext.h
index b26161a1543..a44ec1d0d7d 100644
--- a/lld/include/lld/ReaderWriter/YamlContext.h
+++ b/lld/include/lld/ReaderWriter/YamlContext.h
@@ -10,7 +10,7 @@
#ifndef LLD_READER_WRITER_YAML_CONTEXT_H
#define LLD_READER_WRITER_YAML_CONTEXT_H
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include <functional>
#include <memory>
#include <vector>
diff --git a/lld/lib/CMakeLists.txt b/lld/lib/CMakeLists.txt
index 699f5e93f8a..8884efcfe9b 100644
--- a/lld/lib/CMakeLists.txt
+++ b/lld/lib/CMakeLists.txt
@@ -1,4 +1,3 @@
-add_subdirectory(Config)
add_subdirectory(Core)
add_subdirectory(Driver)
add_subdirectory(ReaderWriter)
diff --git a/lld/lib/Config/CMakeLists.txt b/lld/lib/Config/CMakeLists.txt
deleted file mode 100644
index 3e142b66f57..00000000000
--- a/lld/lib/Config/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-add_lld_library(lldConfig
- Version.cpp
-
- ADDITIONAL_HEADER_DIRS
- ${LLD_INCLUDE_DIR}/lld/Config
-
- LINK_COMPONENTS
- Support
- )
diff --git a/lld/lib/Core/CMakeLists.txt b/lld/lib/Core/CMakeLists.txt
index 85046b93f34..2d4d9ded088 100644
--- a/lld/lib/Core/CMakeLists.txt
+++ b/lld/lib/Core/CMakeLists.txt
@@ -8,10 +8,8 @@ add_lld_library(lldCore
File.cpp
LinkingContext.cpp
Reader.cpp
- Reproduce.cpp
Resolver.cpp
SymbolTable.cpp
- TargetOptionsCommandFlags.cpp
Writer.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index e7cfaaac783..9c51c6cdb19 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -7,13 +7,13 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/Core/Atom.h"
+#include "lld/Core/Resolver.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/ArchiveLibraryFile.h"
+#include "lld/Core/Atom.h"
#include "lld/Core/File.h"
#include "lld/Core/Instrumentation.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/LinkingContext.h"
-#include "lld/Core/Resolver.h"
#include "lld/Core/SharedLibraryFile.h"
#include "lld/Core/SymbolTable.h"
#include "lld/Core/UndefinedAtom.h"
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp
index 583c65acb5d..51ae8d17181 100644
--- a/lld/lib/Core/SymbolTable.cpp
+++ b/lld/lib/Core/SymbolTable.cpp
@@ -8,11 +8,11 @@
//===----------------------------------------------------------------------===//
#include "lld/Core/SymbolTable.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/AbsoluteAtom.h"
#include "lld/Core/Atom.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/LinkingContext.h"
#include "lld/Core/Resolver.h"
#include "lld/Core/SharedLibraryAtom.h"
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp
index 120484b4869..a019e9c3280 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -13,11 +13,11 @@
///
//===----------------------------------------------------------------------===//
+#include "lld/Common/LLVM.h"
#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/LinkingContext.h"
#include "lld/Core/Node.h"
#include "lld/Core/PassManager.h"
diff --git a/lld/lib/ReaderWriter/FileArchive.cpp b/lld/lib/ReaderWriter/FileArchive.cpp
index 762d0871db0..04c0bee7698 100644
--- a/lld/lib/ReaderWriter/FileArchive.cpp
+++ b/lld/lib/ReaderWriter/FileArchive.cpp
@@ -7,9 +7,9 @@
//
//===----------------------------------------------------------------------===//
+#include "lld/Common/LLVM.h"
#include "lld/Core/ArchiveLibraryFile.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reader.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler.h b/lld/lib/ReaderWriter/MachO/ArchHandler.h
index 6028006ca9d..80840b56170 100644
--- a/lld/lib/ReaderWriter/MachO/ArchHandler.h
+++ b/lld/lib/ReaderWriter/MachO/ArchHandler.h
@@ -13,7 +13,7 @@
#include "Atoms.h"
#include "File.h"
#include "MachONormalizedFile.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
index 49d518456a4..1e210409237 100644
--- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
@@ -17,9 +17,9 @@
#include "File.h"
#include "MachONormalizedFileBinaryUtils.h"
#include "MachOPasses.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
#include "llvm/ADT/DenseMap.h"
diff --git a/lld/lib/ReaderWriter/MachO/GOTPass.cpp b/lld/lib/ReaderWriter/MachO/GOTPass.cpp
index 8458a1c7928..49e6f88d4aa 100644
--- a/lld/lib/ReaderWriter/MachO/GOTPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/GOTPass.cpp
@@ -35,9 +35,9 @@
#include "ArchHandler.h"
#include "File.h"
#include "MachOPasses.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
#include "llvm/ADT/DenseMap.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index 7e7b559b150..4ef7a62a829 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -14,11 +14,11 @@
#include "MachONormalizedFile.h"
#include "MachOPasses.h"
#include "SectCreateFile.h"
+#include "lld/Common/Driver.h"
#include "lld/Core/ArchiveLibraryFile.h"
#include "lld/Core/PassManager.h"
#include "lld/Core/Reader.h"
#include "lld/Core/Writer.h"
-#include "lld/Driver/Driver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h b/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
index 31b24dfd102..d5885942515 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
@@ -43,8 +43,8 @@
#define LLD_READER_WRITER_MACHO_NORMALIZE_FILE_H
#include "DebugInfo.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index 2f91818f187..7c2e833c090 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -24,8 +24,8 @@
#include "ArchHandler.h"
#include "MachONormalizedFile.h"
#include "MachONormalizedFileBinaryUtils.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/SharedLibraryFile.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
index b38f7059228..407bd9b9702 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
@@ -11,8 +11,8 @@
#define LLD_READER_WRITER_MACHO_NORMALIZED_FILE_BINARY_UTILS_H
#include "MachONormalizedFile.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/Casting.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
index bac41d2a52b..ac7b61653f5 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
@@ -23,8 +23,8 @@
#include "MachONormalizedFile.h"
#include "MachONormalizedFileBinaryUtils.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
index f2e5ed78167..e93ca86c316 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -24,8 +24,8 @@
#include "DebugInfo.h"
#include "MachONormalizedFile.h"
#include "MachONormalizedFileBinaryUtils.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/MachO.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
index 226a25d3c1e..3b07a40f9bf 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
@@ -25,8 +25,8 @@
#include "File.h"
#include "MachONormalizedFile.h"
#include "MachONormalizedFileBinaryUtils.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
index 5233e42e5fc..2cce18fd635 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
@@ -16,8 +16,8 @@
/// +------------+ +------+
#include "MachONormalizedFile.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/Error.h"
-#include "lld/Core/LLVM.h"
#include "lld/ReaderWriter/YamlContext.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lld/lib/ReaderWriter/MachO/ObjCPass.cpp b/lld/lib/ReaderWriter/MachO/ObjCPass.cpp
index ccea081f053..23c71e0f5ec 100644
--- a/lld/lib/ReaderWriter/MachO/ObjCPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/ObjCPass.cpp
@@ -13,9 +13,9 @@
#include "File.h"
#include "MachONormalizedFileBinaryUtils.h"
#include "MachOPasses.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
diff --git a/lld/lib/ReaderWriter/MachO/ShimPass.cpp b/lld/lib/ReaderWriter/MachO/ShimPass.cpp
index ff559d70eab..8a2d2e910ca 100644
--- a/lld/lib/ReaderWriter/MachO/ShimPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/ShimPass.cpp
@@ -26,9 +26,9 @@
#include "ArchHandler.h"
#include "File.h"
#include "MachOPasses.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
diff --git a/lld/lib/ReaderWriter/MachO/StubsPass.cpp b/lld/lib/ReaderWriter/MachO/StubsPass.cpp
index 19e2bc592f5..04c586df336 100644
--- a/lld/lib/ReaderWriter/MachO/StubsPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/StubsPass.cpp
@@ -17,9 +17,9 @@
#include "ArchHandler.h"
#include "File.h"
#include "MachOPasses.h"
+#include "lld/Common/LLVM.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp
index 3b45aecd790..8b74d90cab9 100644
--- a/lld/tools/lld/lld.cpp
+++ b/lld/tools/lld/lld.cpp
@@ -16,7 +16,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/Driver/Driver.h"
+#include "lld/Common/Driver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
diff --git a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
index d81f1543f45..696be69bc26 100644
--- a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
+++ b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
@@ -12,7 +12,7 @@
///
//===----------------------------------------------------------------------===//
-#include "lld/Driver/Driver.h"
+#include "lld/Common/Driver.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/raw_ostream.h"
OpenPOWER on IntegriCloud