[lld] r314719 - Move new lld's code to Common subdirectory.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 14:00:42 PDT 2017


Author: ruiu
Date: Mon Oct  2 14:00:41 2017
New Revision: 314719

URL: http://llvm.org/viewvc/llvm-project?rev=314719&view=rev
Log:
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

Added:
    lld/trunk/Common/
    lld/trunk/Common/CMakeLists.txt
    lld/trunk/Common/Reproduce.cpp
    lld/trunk/Common/TargetOptionsCommandFlags.cpp
    lld/trunk/Common/Version.cpp
    lld/trunk/include/lld/Common/
    lld/trunk/include/lld/Common/Driver.h
    lld/trunk/include/lld/Common/LLVM.h
    lld/trunk/include/lld/Common/Reproduce.h
    lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
    lld/trunk/include/lld/Common/Version.h
    lld/trunk/include/lld/Common/Version.inc.in
Removed:
    lld/trunk/include/lld/Config/
    lld/trunk/include/lld/Core/LLVM.h
    lld/trunk/include/lld/Core/Reproduce.h
    lld/trunk/include/lld/Core/TargetOptionsCommandFlags.h
    lld/trunk/include/lld/Driver/
    lld/trunk/lib/Config/
    lld/trunk/lib/Core/Reproduce.cpp
    lld/trunk/lib/Core/TargetOptionsCommandFlags.cpp
Modified:
    lld/trunk/CMakeLists.txt
    lld/trunk/COFF/CMakeLists.txt
    lld/trunk/COFF/Chunks.h
    lld/trunk/COFF/Driver.cpp
    lld/trunk/COFF/Driver.h
    lld/trunk/COFF/Error.h
    lld/trunk/COFF/InputFiles.h
    lld/trunk/COFF/LTO.cpp
    lld/trunk/COFF/LTO.h
    lld/trunk/COFF/Symbols.h
    lld/trunk/ELF/CMakeLists.txt
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/Driver.h
    lld/trunk/ELF/DriverUtils.cpp
    lld/trunk/ELF/EhFrame.h
    lld/trunk/ELF/Error.h
    lld/trunk/ELF/Filesystem.h
    lld/trunk/ELF/InputFiles.h
    lld/trunk/ELF/InputSection.h
    lld/trunk/ELF/LTO.cpp
    lld/trunk/ELF/LTO.h
    lld/trunk/ELF/LinkerScript.h
    lld/trunk/ELF/OutputSections.h
    lld/trunk/ELF/Relocations.h
    lld/trunk/ELF/ScriptLexer.h
    lld/trunk/ELF/ScriptParser.h
    lld/trunk/ELF/Strings.h
    lld/trunk/ELF/Symbols.h
    lld/trunk/ELF/SyntheticSections.cpp
    lld/trunk/docs/Driver.rst
    lld/trunk/include/lld/Core/Atom.h
    lld/trunk/include/lld/Core/DefinedAtom.h
    lld/trunk/include/lld/Core/Error.h
    lld/trunk/include/lld/Core/PassManager.h
    lld/trunk/include/lld/Core/Reader.h
    lld/trunk/include/lld/Core/SymbolTable.h
    lld/trunk/include/lld/Core/Writer.h
    lld/trunk/include/lld/ReaderWriter/YamlContext.h
    lld/trunk/lib/CMakeLists.txt
    lld/trunk/lib/Core/CMakeLists.txt
    lld/trunk/lib/Core/Resolver.cpp
    lld/trunk/lib/Core/SymbolTable.cpp
    lld/trunk/lib/Driver/DarwinLdDriver.cpp
    lld/trunk/lib/ReaderWriter/FileArchive.cpp
    lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h
    lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
    lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp
    lld/trunk/tools/lld/lld.cpp
    lld/trunk/unittests/DriverTests/DarwinLdDriverTest.cpp

Modified: lld/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/CMakeLists.txt?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/CMakeLists.txt (original)
+++ lld/trunk/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -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)
 

Modified: lld/trunk/COFF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/CMakeLists.txt?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/CMakeLists.txt (original)
+++ lld/trunk/COFF/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -42,6 +42,7 @@ add_lld_library(lldCOFF
   WindowsManifest
 
   LINK_LIBS
+  lldCommon
   lldCore
   ${LLVM_PTHREAD_LIB}
 

Modified: lld/trunk/COFF/Chunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.h (original)
+++ lld/trunk/COFF/Chunks.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/COFF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.h (original)
+++ lld/trunk/COFF/Driver.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/COFF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Error.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/Error.h (original)
+++ lld/trunk/COFF/Error.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/COFF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.h (original)
+++ lld/trunk/COFF/InputFiles.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/COFF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/LTO.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/LTO.cpp (original)
+++ lld/trunk/COFF/LTO.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/COFF/LTO.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/LTO.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/LTO.h (original)
+++ lld/trunk/COFF/LTO.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/COFF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Symbols.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/COFF/Symbols.h (original)
+++ lld/trunk/COFF/Symbols.h Mon Oct  2 14:00:41 2017
@@ -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"

Added: lld/trunk/Common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Common/CMakeLists.txt?rev=314719&view=auto
==============================================================================
--- lld/trunk/Common/CMakeLists.txt (added)
+++ lld/trunk/Common/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -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
+  )

Added: lld/trunk/Common/Reproduce.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Common/Reproduce.cpp?rev=314719&view=auto
==============================================================================
--- lld/trunk/Common/Reproduce.cpp (added)
+++ lld/trunk/Common/Reproduce.cpp Mon Oct  2 14:00:41 2017
@@ -0,0 +1,66 @@
+//===- Reproduce.cpp - Utilities for creating reproducers -----------------===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lld/Common/Reproduce.h"
+#include "llvm/Option/Arg.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Path.h"
+
+using namespace lld;
+using namespace llvm;
+using namespace llvm::sys;
+
+// Makes a given pathname an absolute path first, and then remove
+// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",
+// assuming that the current directory is "/home/john/bar".
+// Returned string is a forward slash separated path even on Windows to avoid
+// a mess with backslash-as-escape and backslash-as-path-separator.
+std::string lld::relativeToRoot(StringRef Path) {
+  SmallString<128> Abs = Path;
+  if (fs::make_absolute(Abs))
+    return Path;
+  path::remove_dots(Abs, /*remove_dot_dot=*/true);
+
+  // This is Windows specific. root_name() returns a drive letter
+  // (e.g. "c:") or a UNC name (//net). We want to keep it as part
+  // of the result.
+  SmallString<128> Res;
+  StringRef Root = path::root_name(Abs);
+  if (Root.endswith(":"))
+    Res = Root.drop_back();
+  else if (Root.startswith("//"))
+    Res = Root.substr(2);
+
+  path::append(Res, path::relative_path(Abs));
+  return path::convert_to_slash(Res);
+}
+
+// Quote a given string if it contains a space character.
+std::string lld::quote(StringRef S) {
+  if (S.contains(' '))
+    return ("\"" + S + "\"").str();
+  return S;
+}
+
+std::string lld::rewritePath(StringRef S) {
+  if (fs::exists(S))
+    return relativeToRoot(S);
+  return S;
+}
+
+std::string lld::toString(opt::Arg *Arg) {
+  std::string K = Arg->getSpelling();
+  if (Arg->getNumValues() == 0)
+    return K;
+  std::string V = quote(Arg->getValue());
+  if (Arg->getOption().getRenderStyle() == opt::Option::RenderJoinedStyle)
+    return K + V;
+  return K + " " + V;
+}

Added: lld/trunk/Common/TargetOptionsCommandFlags.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Common/TargetOptionsCommandFlags.cpp?rev=314719&view=auto
==============================================================================
--- lld/trunk/Common/TargetOptionsCommandFlags.cpp (added)
+++ lld/trunk/Common/TargetOptionsCommandFlags.cpp Mon Oct  2 14:00:41 2017
@@ -0,0 +1,32 @@
+//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file exists as a place for global variables defined in LLVM's
+// CodeGen/CommandFlags.h. By putting the resulting object file in
+// an archive and linking with it, the definitions will automatically be
+// included when needed and skipped when already present.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lld/Common/TargetOptionsCommandFlags.h"
+
+#include "llvm/CodeGen/CommandFlags.h"
+#include "llvm/Target/TargetOptions.h"
+
+// Define an externally visible version of
+// InitTargetOptionsFromCodeGenFlags, so that its functionality can be
+// used without having to include llvm/CodeGen/CommandFlags.h, which
+// would lead to multiple definitions of the command line flags.
+llvm::TargetOptions lld::InitTargetOptionsFromCodeGenFlags() {
+  return ::InitTargetOptionsFromCodeGenFlags();
+}
+
+llvm::Optional<llvm::CodeModel::Model> lld::GetCodeModelFromCMModel() {
+  return getCodeModel();
+}

Added: lld/trunk/Common/Version.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Common/Version.cpp?rev=314719&view=auto
==============================================================================
--- lld/trunk/Common/Version.cpp (added)
+++ lld/trunk/Common/Version.cpp Mon Oct  2 14:00:41 2017
@@ -0,0 +1,43 @@
+//===- lib/Common/Version.cpp - LLD Version Number ---------------*- C++-=====//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines several version-related utility functions for LLD.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lld/Common/Version.h"
+
+using namespace llvm;
+
+// Returns an SVN repository path, which is usually "trunk".
+static std::string getRepositoryPath() {
+  StringRef S = LLD_REPOSITORY_STRING;
+  size_t Pos = S.find("lld/");
+  if (Pos != StringRef::npos)
+    return S.substr(Pos + 4);
+  return S;
+}
+
+// Returns an SVN repository name, e.g., " (trunk 284614)"
+// or an empty string if no repository info is available.
+static std::string getRepository() {
+  std::string Repo = getRepositoryPath();
+  std::string Rev = LLD_REVISION_STRING;
+
+  if (Repo.empty() && Rev.empty())
+    return "";
+  if (!Repo.empty() && !Rev.empty())
+    return " (" + Repo + " " + Rev + ")";
+  return " (" + Repo + Rev + ")";
+}
+
+// Returns a version string, e.g., "LLD 4.0 (lld/trunk 284614)".
+std::string lld::getLLDVersion() {
+  return "LLD " + std::string(LLD_VERSION_STRING) + getRepository();
+}

Modified: lld/trunk/ELF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/CMakeLists.txt?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/CMakeLists.txt (original)
+++ lld/trunk/ELF/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -65,6 +65,7 @@ add_lld_library(lldELF
   TransformUtils
 
   LINK_LIBS
+  lldCommon
   lldConfig
   lldCore
   ${LLVM_PTHREAD_LIB}

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.h (original)
+++ lld/trunk/ELF/Driver.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/EhFrame.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/EhFrame.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/EhFrame.h (original)
+++ lld/trunk/ELF/EhFrame.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Mon Oct  2 14:00:41 2017
@@ -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"
 

Modified: lld/trunk/ELF/Filesystem.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Filesystem.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Filesystem.h (original)
+++ lld/trunk/ELF/Filesystem.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/LTO.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.h (original)
+++ lld/trunk/ELF/LTO.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Mon Oct  2 14:00:41 2017
@@ -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"
 

Modified: lld/trunk/ELF/Relocations.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.h (original)
+++ lld/trunk/ELF/Relocations.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/ELF/ScriptLexer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptLexer.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptLexer.h (original)
+++ lld/trunk/ELF/ScriptLexer.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/ELF/ScriptParser.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptParser.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptParser.h (original)
+++ lld/trunk/ELF/ScriptParser.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/ELF/Strings.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Strings.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Strings.h (original)
+++ lld/trunk/ELF/Strings.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Mon Oct  2 14:00:41 2017
@@ -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"
 

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/docs/Driver.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Driver.rst?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/docs/Driver.rst (original)
+++ lld/trunk/docs/Driver.rst Mon Oct  2 14:00:41 2017
@@ -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

Added: lld/trunk/include/lld/Common/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/Driver.h?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/Driver.h (added)
+++ lld/trunk/include/lld/Common/Driver.h Mon Oct  2 14:00:41 2017
@@ -0,0 +1,38 @@
+//===- lld/Common/Driver.h - Linker Driver Emulator -----------------------===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_COMMON_DRIVER_H
+#define LLD_COMMON_DRIVER_H
+
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace lld {
+namespace coff {
+bool link(llvm::ArrayRef<const char *> Args,
+          llvm::raw_ostream &Diag = llvm::errs());
+}
+
+namespace mingw {
+bool link(llvm::ArrayRef<const char *> Args,
+          llvm::raw_ostream &Diag = llvm::errs());
+}
+
+namespace elf {
+bool link(llvm::ArrayRef<const char *> Args, bool CanExitEarly,
+          llvm::raw_ostream &Diag = llvm::errs());
+}
+
+namespace mach_o {
+bool link(llvm::ArrayRef<const char *> Args,
+          llvm::raw_ostream &Diag = llvm::errs());
+}
+}
+
+#endif

Added: lld/trunk/include/lld/Common/LLVM.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/LLVM.h?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/LLVM.h (added)
+++ lld/trunk/include/lld/Common/LLVM.h Mon Oct  2 14:00:41 2017
@@ -0,0 +1,83 @@
+//===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file forward declares and imports various common LLVM datatypes that
+// lld wants to use unqualified.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_COMMON_LLVM_H
+#define LLD_COMMON_LLVM_H
+
+// This should be the only #include, force #includes of all the others on
+// clients.
+#include "llvm/ADT/Hashing.h"
+#include "llvm/Support/Casting.h"
+#include <utility>
+
+namespace llvm {
+  // ADT's.
+  class Error;
+  class StringRef;
+  class Twine;
+  class MemoryBuffer;
+  class MemoryBufferRef;
+  template<typename T> class ArrayRef;
+  template<unsigned InternalLen> class SmallString;
+  template<typename T, unsigned N> class SmallVector;
+  template<typename T> class SmallVectorImpl;
+
+  template<typename T>
+  struct SaveAndRestore;
+
+  template<typename T>
+  class ErrorOr;
+
+  template<typename T>
+  class Expected;
+
+  class raw_ostream;
+  // TODO: DenseMap, ...
+}
+
+namespace lld {
+  // Casting operators.
+  using llvm::isa;
+  using llvm::cast;
+  using llvm::dyn_cast;
+  using llvm::dyn_cast_or_null;
+  using llvm::cast_or_null;
+
+  // ADT's.
+  using llvm::Error;
+  using llvm::StringRef;
+  using llvm::Twine;
+  using llvm::MemoryBuffer;
+  using llvm::MemoryBufferRef;
+  using llvm::ArrayRef;
+  using llvm::SmallString;
+  using llvm::SmallVector;
+  using llvm::SmallVectorImpl;
+  using llvm::SaveAndRestore;
+  using llvm::ErrorOr;
+  using llvm::Expected;
+
+  using llvm::raw_ostream;
+} // end namespace lld.
+
+namespace std {
+template <> struct hash<llvm::StringRef> {
+public:
+  size_t operator()(const llvm::StringRef &s) const {
+    return llvm::hash_value(s);
+  }
+};
+}
+
+#endif

Added: lld/trunk/include/lld/Common/Reproduce.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/Reproduce.h?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/Reproduce.h (added)
+++ lld/trunk/include/lld/Common/Reproduce.h Mon Oct  2 14:00:41 2017
@@ -0,0 +1,39 @@
+//===- Reproduce.h - Utilities for creating reproducers ---------*- C++ -*-===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_COMMON_REPRODUCE_H
+#define LLD_COMMON_REPRODUCE_H
+
+#include "lld/Common/LLVM.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace opt { class Arg; }
+}
+
+namespace lld {
+
+// Makes a given pathname an absolute path first, and then remove
+// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",
+// assuming that the current directory is "/home/john/bar".
+std::string relativeToRoot(StringRef Path);
+
+// Quote a given string if it contains a space character.
+std::string quote(StringRef S);
+
+// Rewrite the given path if a file exists with that pathname, otherwise
+// returns the original path.
+std::string rewritePath(StringRef S);
+
+// Returns the string form of the given argument.
+std::string toString(llvm::opt::Arg *Arg);
+}
+
+#endif

Added: lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h (added)
+++ lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h Mon Oct  2 14:00:41 2017
@@ -0,0 +1,21 @@
+//===-- TargetOptionsCommandFlags.h ----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Helper to create TargetOptions from command line flags.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/Optional.h"
+#include "llvm/Support/CodeGen.h"
+#include "llvm/Target/TargetOptions.h"
+
+namespace lld {
+llvm::TargetOptions InitTargetOptionsFromCodeGenFlags();
+llvm::Optional<llvm::CodeModel::Model> GetCodeModelFromCMModel();
+}

Added: lld/trunk/include/lld/Common/Version.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/Version.h?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/Version.h (added)
+++ lld/trunk/include/lld/Common/Version.h Mon Oct  2 14:00:41 2017
@@ -0,0 +1,25 @@
+//===- lld/Common/Version.h - LLD Version Number ----------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Defines a version-related utility function.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_VERSION_H
+#define LLD_VERSION_H
+
+#include "lld/Common/Version.inc"
+#include "llvm/ADT/StringRef.h"
+
+namespace lld {
+/// \brief Retrieves a string representing the complete lld version.
+std::string getLLDVersion();
+}
+
+#endif // LLD_VERSION_H

Added: lld/trunk/include/lld/Common/Version.inc.in
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/Version.inc.in?rev=314719&view=auto
==============================================================================
--- lld/trunk/include/lld/Common/Version.inc.in (added)
+++ lld/trunk/include/lld/Common/Version.inc.in Mon Oct  2 14:00:41 2017
@@ -0,0 +1,6 @@
+#define LLD_VERSION @LLD_VERSION@
+#define LLD_VERSION_STRING "@LLD_VERSION@"
+#define LLD_VERSION_MAJOR @LLD_VERSION_MAJOR@
+#define LLD_VERSION_MINOR @LLD_VERSION_MINOR@
+#define LLD_REVISION_STRING "@LLD_REVISION@"
+#define LLD_REPOSITORY_STRING "@LLD_REPOSITORY@"

Modified: lld/trunk/include/lld/Core/Atom.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Atom.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Atom.h (original)
+++ lld/trunk/include/lld/Core/Atom.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/include/lld/Core/DefinedAtom.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/DefinedAtom.h (original)
+++ lld/trunk/include/lld/Core/DefinedAtom.h Mon Oct  2 14:00:41 2017
@@ -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 {

Modified: lld/trunk/include/lld/Core/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Error.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Error.h (original)
+++ lld/trunk/include/lld/Core/Error.h Mon Oct  2 14:00:41 2017
@@ -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>

Removed: lld/trunk/include/lld/Core/LLVM.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/LLVM.h?rev=314718&view=auto
==============================================================================
--- lld/trunk/include/lld/Core/LLVM.h (original)
+++ lld/trunk/include/lld/Core/LLVM.h (removed)
@@ -1,83 +0,0 @@
-//===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file forward declares and imports various common LLVM datatypes that
-// lld wants to use unqualified.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_CORE_LLVM_H
-#define LLD_CORE_LLVM_H
-
-// This should be the only #include, force #includes of all the others on
-// clients.
-#include "llvm/ADT/Hashing.h"
-#include "llvm/Support/Casting.h"
-#include <utility>
-
-namespace llvm {
-  // ADT's.
-  class Error;
-  class StringRef;
-  class Twine;
-  class MemoryBuffer;
-  class MemoryBufferRef;
-  template<typename T> class ArrayRef;
-  template<unsigned InternalLen> class SmallString;
-  template<typename T, unsigned N> class SmallVector;
-  template<typename T> class SmallVectorImpl;
-
-  template<typename T>
-  struct SaveAndRestore;
-
-  template<typename T>
-  class ErrorOr;
-
-  template<typename T>
-  class Expected;
-
-  class raw_ostream;
-  // TODO: DenseMap, ...
-}
-
-namespace lld {
-  // Casting operators.
-  using llvm::isa;
-  using llvm::cast;
-  using llvm::dyn_cast;
-  using llvm::dyn_cast_or_null;
-  using llvm::cast_or_null;
-
-  // ADT's.
-  using llvm::Error;
-  using llvm::StringRef;
-  using llvm::Twine;
-  using llvm::MemoryBuffer;
-  using llvm::MemoryBufferRef;
-  using llvm::ArrayRef;
-  using llvm::SmallString;
-  using llvm::SmallVector;
-  using llvm::SmallVectorImpl;
-  using llvm::SaveAndRestore;
-  using llvm::ErrorOr;
-  using llvm::Expected;
-
-  using llvm::raw_ostream;
-} // end namespace lld.
-
-namespace std {
-template <> struct hash<llvm::StringRef> {
-public:
-  size_t operator()(const llvm::StringRef &s) const {
-    return llvm::hash_value(s);
-  }
-};
-}
-
-#endif

Modified: lld/trunk/include/lld/Core/PassManager.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/PassManager.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/PassManager.h (original)
+++ lld/trunk/include/lld/Core/PassManager.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/include/lld/Core/Reader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Reader.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Reader.h (original)
+++ lld/trunk/include/lld/Core/Reader.h Mon Oct  2 14:00:41 2017
@@ -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"

Removed: lld/trunk/include/lld/Core/Reproduce.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Reproduce.h?rev=314718&view=auto
==============================================================================
--- lld/trunk/include/lld/Core/Reproduce.h (original)
+++ lld/trunk/include/lld/Core/Reproduce.h (removed)
@@ -1,39 +0,0 @@
-//===- Reproduce.h - Utilities for creating reproducers ---------*- C++ -*-===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_CORE_REPRODUCE_H
-#define LLD_CORE_REPRODUCE_H
-
-#include "lld/Core/LLVM.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Error.h"
-
-namespace llvm {
-namespace opt { class Arg; }
-}
-
-namespace lld {
-
-// Makes a given pathname an absolute path first, and then remove
-// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",
-// assuming that the current directory is "/home/john/bar".
-std::string relativeToRoot(StringRef Path);
-
-// Quote a given string if it contains a space character.
-std::string quote(StringRef S);
-
-// Rewrite the given path if a file exists with that pathname, otherwise
-// returns the original path.
-std::string rewritePath(StringRef S);
-
-// Returns the string form of the given argument.
-std::string toString(llvm::opt::Arg *Arg);
-}
-
-#endif

Modified: lld/trunk/include/lld/Core/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/SymbolTable.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/SymbolTable.h (original)
+++ lld/trunk/include/lld/Core/SymbolTable.h Mon Oct  2 14:00:41 2017
@@ -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>

Removed: lld/trunk/include/lld/Core/TargetOptionsCommandFlags.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/TargetOptionsCommandFlags.h?rev=314718&view=auto
==============================================================================
--- lld/trunk/include/lld/Core/TargetOptionsCommandFlags.h (original)
+++ lld/trunk/include/lld/Core/TargetOptionsCommandFlags.h (removed)
@@ -1,21 +0,0 @@
-//===-- TargetOptionsCommandFlags.h ----------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// Helper to create TargetOptions from command line flags.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/Optional.h"
-#include "llvm/Support/CodeGen.h"
-#include "llvm/Target/TargetOptions.h"
-
-namespace lld {
-llvm::TargetOptions InitTargetOptionsFromCodeGenFlags();
-llvm::Optional<llvm::CodeModel::Model> GetCodeModelFromCMModel();
-}

Modified: lld/trunk/include/lld/Core/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Writer.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Writer.h (original)
+++ lld/trunk/include/lld/Core/Writer.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/include/lld/ReaderWriter/YamlContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/YamlContext.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/YamlContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/YamlContext.h Mon Oct  2 14:00:41 2017
@@ -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>

Modified: lld/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/CMakeLists.txt?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/CMakeLists.txt (original)
+++ lld/trunk/lib/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -1,4 +1,3 @@
-add_subdirectory(Config)
 add_subdirectory(Core)
 add_subdirectory(Driver)
 add_subdirectory(ReaderWriter)

Modified: lld/trunk/lib/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/CMakeLists.txt?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/Core/CMakeLists.txt (original)
+++ lld/trunk/lib/Core/CMakeLists.txt Mon Oct  2 14:00:41 2017
@@ -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

Removed: lld/trunk/lib/Core/Reproduce.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Reproduce.cpp?rev=314718&view=auto
==============================================================================
--- lld/trunk/lib/Core/Reproduce.cpp (original)
+++ lld/trunk/lib/Core/Reproduce.cpp (removed)
@@ -1,66 +0,0 @@
-//===- Reproduce.cpp - Utilities for creating reproducers -----------------===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Core/Reproduce.h"
-#include "llvm/Option/Arg.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/Path.h"
-
-using namespace lld;
-using namespace llvm;
-using namespace llvm::sys;
-
-// Makes a given pathname an absolute path first, and then remove
-// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",
-// assuming that the current directory is "/home/john/bar".
-// Returned string is a forward slash separated path even on Windows to avoid
-// a mess with backslash-as-escape and backslash-as-path-separator.
-std::string lld::relativeToRoot(StringRef Path) {
-  SmallString<128> Abs = Path;
-  if (fs::make_absolute(Abs))
-    return Path;
-  path::remove_dots(Abs, /*remove_dot_dot=*/true);
-
-  // This is Windows specific. root_name() returns a drive letter
-  // (e.g. "c:") or a UNC name (//net). We want to keep it as part
-  // of the result.
-  SmallString<128> Res;
-  StringRef Root = path::root_name(Abs);
-  if (Root.endswith(":"))
-    Res = Root.drop_back();
-  else if (Root.startswith("//"))
-    Res = Root.substr(2);
-
-  path::append(Res, path::relative_path(Abs));
-  return path::convert_to_slash(Res);
-}
-
-// Quote a given string if it contains a space character.
-std::string lld::quote(StringRef S) {
-  if (S.contains(' '))
-    return ("\"" + S + "\"").str();
-  return S;
-}
-
-std::string lld::rewritePath(StringRef S) {
-  if (fs::exists(S))
-    return relativeToRoot(S);
-  return S;
-}
-
-std::string lld::toString(opt::Arg *Arg) {
-  std::string K = Arg->getSpelling();
-  if (Arg->getNumValues() == 0)
-    return K;
-  std::string V = quote(Arg->getValue());
-  if (Arg->getOption().getRenderStyle() == opt::Option::RenderJoinedStyle)
-    return K + V;
-  return K + " " + V;
-}

Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/Core/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/SymbolTable.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/Core/SymbolTable.cpp (original)
+++ lld/trunk/lib/Core/SymbolTable.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Removed: lld/trunk/lib/Core/TargetOptionsCommandFlags.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/TargetOptionsCommandFlags.cpp?rev=314718&view=auto
==============================================================================
--- lld/trunk/lib/Core/TargetOptionsCommandFlags.cpp (original)
+++ lld/trunk/lib/Core/TargetOptionsCommandFlags.cpp (removed)
@@ -1,32 +0,0 @@
-//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file exists as a place for global variables defined in LLVM's
-// CodeGen/CommandFlags.h. By putting the resulting object file in
-// an archive and linking with it, the definitions will automatically be
-// included when needed and skipped when already present.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Core/TargetOptionsCommandFlags.h"
-
-#include "llvm/CodeGen/CommandFlags.h"
-#include "llvm/Target/TargetOptions.h"
-
-// Define an externally visible version of
-// InitTargetOptionsFromCodeGenFlags, so that its functionality can be
-// used without having to include llvm/CodeGen/CommandFlags.h, which
-// would lead to multiple definitions of the command line flags.
-llvm::TargetOptions lld::InitTargetOptionsFromCodeGenFlags() {
-  return ::InitTargetOptionsFromCodeGenFlags();
-}
-
-llvm::Optional<llvm::CodeModel::Model> lld::GetCodeModelFromCMModel() {
-  return getCodeModel();
-}

Modified: lld/trunk/lib/Driver/DarwinLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/DarwinLdDriver.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/Driver/DarwinLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/DarwinLdDriver.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/FileArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/FileArchive.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/FileArchive.cpp (original)
+++ lld/trunk/lib/ReaderWriter/FileArchive.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/tools/lld/lld.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/lld.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/tools/lld/lld.cpp (original)
+++ lld/trunk/tools/lld/lld.cpp Mon Oct  2 14:00:41 2017
@@ -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"

Modified: lld/trunk/unittests/DriverTests/DarwinLdDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DarwinLdDriverTest.cpp?rev=314719&r1=314718&r2=314719&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/DarwinLdDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/DarwinLdDriverTest.cpp Mon Oct  2 14:00:41 2017
@@ -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"




More information about the llvm-commits mailing list