Index: lld/CMakeLists.txt =================================================================== --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -160,8 +160,8 @@ # 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 @@ ) endif() +add_subdirectory(Common) add_subdirectory(lib) add_subdirectory(tools/lld) Index: lld/COFF/CMakeLists.txt =================================================================== --- lld/COFF/CMakeLists.txt +++ lld/COFF/CMakeLists.txt @@ -42,6 +42,7 @@ WindowsManifest LINK_LIBS + lldCommon lldCore ${LLVM_PTHREAD_LIB} Index: lld/COFF/Chunks.h =================================================================== --- lld/COFF/Chunks.h +++ 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" Index: lld/COFF/Driver.h =================================================================== --- lld/COFF/Driver.h +++ 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" Index: lld/COFF/Driver.cpp =================================================================== --- lld/COFF/Driver.cpp +++ 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" Index: lld/COFF/Error.h =================================================================== --- lld/COFF/Error.h +++ 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 { Index: lld/COFF/InputFiles.h =================================================================== --- lld/COFF/InputFiles.h +++ 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" Index: lld/COFF/LTO.h =================================================================== --- lld/COFF/LTO.h +++ 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 #include Index: lld/COFF/LTO.cpp =================================================================== --- lld/COFF/LTO.cpp +++ 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" Index: lld/COFF/Symbols.h =================================================================== --- lld/COFF/Symbols.h +++ 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" Index: lld/Common/CMakeLists.txt =================================================================== --- /dev/null +++ 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 + ) Index: lld/Common/Reproduce.cpp =================================================================== --- lld/Common/Reproduce.cpp +++ 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" Index: lld/Common/TargetOptionsCommandFlags.cpp =================================================================== --- lld/Common/TargetOptionsCommandFlags.cpp +++ 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" Index: lld/ELF/CMakeLists.txt =================================================================== --- lld/ELF/CMakeLists.txt +++ lld/ELF/CMakeLists.txt @@ -65,6 +65,7 @@ TransformUtils LINK_LIBS + lldCommon lldConfig lldCore ${LLVM_PTHREAD_LIB} Index: lld/ELF/Driver.h =================================================================== --- lld/ELF/Driver.h +++ 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" Index: lld/ELF/Driver.cpp =================================================================== --- lld/ELF/Driver.cpp +++ lld/ELF/Driver.cpp @@ -40,8 +40,8 @@ #include "Target.h" #include "Threads.h" #include "Writer.h" +#include "lld/Common/Driver.h" #include "lld/Config/Version.h" -#include "lld/Driver/Driver.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/CommandLine.h" Index: lld/ELF/DriverUtils.cpp =================================================================== --- lld/ELF/DriverUtils.cpp +++ lld/ELF/DriverUtils.cpp @@ -16,8 +16,8 @@ #include "Driver.h" #include "Error.h" #include "Memory.h" +#include "lld/Common/Reproduce.h" #include "lld/Config/Version.h" -#include "lld/Core/Reproduce.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Triple.h" Index: lld/ELF/EhFrame.h =================================================================== --- lld/ELF/EhFrame.h +++ 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 { Index: lld/ELF/Error.h =================================================================== --- lld/ELF/Error.h +++ 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" Index: lld/ELF/Filesystem.h =================================================================== --- lld/ELF/Filesystem.h +++ 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 { Index: lld/ELF/InputFiles.h =================================================================== --- lld/ELF/InputFiles.h +++ 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" Index: lld/ELF/InputSection.h =================================================================== --- lld/ELF/InputSection.h +++ 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" Index: lld/ELF/LTO.h =================================================================== --- lld/ELF/LTO.h +++ 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 Index: lld/ELF/LTO.cpp =================================================================== --- lld/ELF/LTO.cpp +++ lld/ELF/LTO.cpp @@ -13,7 +13,7 @@ #include "InputFiles.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" Index: lld/ELF/LinkerScript.h =================================================================== --- lld/ELF/LinkerScript.h +++ 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" Index: lld/ELF/OutputSections.h =================================================================== --- lld/ELF/OutputSections.h +++ 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" Index: lld/ELF/Relocations.h =================================================================== --- lld/ELF/Relocations.h +++ 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 #include Index: lld/ELF/ScriptLexer.h =================================================================== --- lld/ELF/ScriptLexer.h +++ 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 Index: lld/ELF/ScriptParser.h =================================================================== --- lld/ELF/ScriptParser.h +++ 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 { Index: lld/ELF/Strings.h =================================================================== --- lld/ELF/Strings.h +++ 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" Index: lld/ELF/Symbols.h =================================================================== --- lld/ELF/Symbols.h +++ 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" Index: lld/docs/Driver.rst =================================================================== --- lld/docs/Driver.rst +++ lld/docs/Driver.rst @@ -65,7 +65,7 @@ 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 Index: lld/include/lld/Common/Driver.h =================================================================== --- lld/include/lld/Common/Driver.h +++ 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" Index: lld/include/lld/Common/LLVM.h =================================================================== --- lld/include/lld/Common/LLVM.h +++ 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. Index: lld/include/lld/Common/Reproduce.h =================================================================== --- lld/include/lld/Common/Reproduce.h +++ 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" Index: lld/include/lld/Config/Version.h =================================================================== --- /dev/null +++ lld/include/lld/Config/Version.h @@ -1,25 +0,0 @@ -//===- lld/Config/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/Config/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 Index: lld/include/lld/Config/Version.inc.in =================================================================== --- /dev/null +++ lld/include/lld/Config/Version.inc.in @@ -1,6 +0,0 @@ -#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@" Index: lld/include/lld/Core/Atom.h =================================================================== --- lld/include/lld/Core/Atom.h +++ 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 { Index: lld/include/lld/Core/DefinedAtom.h =================================================================== --- lld/include/lld/Core/DefinedAtom.h +++ 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 { Index: lld/include/lld/Core/Error.h =================================================================== --- lld/include/lld/Core/Error.h +++ 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 Index: lld/include/lld/Core/PassManager.h =================================================================== --- lld/include/lld/Core/PassManager.h +++ 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 Index: lld/include/lld/Core/Reader.h =================================================================== --- lld/include/lld/Core/Reader.h +++ 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" Index: lld/include/lld/Core/SymbolTable.h =================================================================== --- lld/include/lld/Core/SymbolTable.h +++ 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 Index: lld/include/lld/Core/TargetOptionsCommandFlags.h =================================================================== --- /dev/null +++ lld/include/lld/Core/TargetOptionsCommandFlags.h @@ -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 GetCodeModelFromCMModel(); -} Index: lld/include/lld/Core/Writer.h =================================================================== --- lld/include/lld/Core/Writer.h +++ 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 #include Index: lld/include/lld/ReaderWriter/YamlContext.h =================================================================== --- lld/include/lld/ReaderWriter/YamlContext.h +++ 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 #include #include Index: lld/lib/CMakeLists.txt =================================================================== --- lld/lib/CMakeLists.txt +++ lld/lib/CMakeLists.txt @@ -1,4 +1,3 @@ -add_subdirectory(Config) add_subdirectory(Core) add_subdirectory(Driver) add_subdirectory(ReaderWriter) Index: lld/lib/Config/CMakeLists.txt =================================================================== --- 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 - ) Index: lld/lib/Config/Version.cpp =================================================================== --- /dev/null +++ lld/lib/Config/Version.cpp @@ -1,43 +0,0 @@ -//===- lib/Config/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/Config/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(); -} Index: lld/lib/Core/CMakeLists.txt =================================================================== --- lld/lib/Core/CMakeLists.txt +++ lld/lib/Core/CMakeLists.txt @@ -8,10 +8,8 @@ File.cpp LinkingContext.cpp Reader.cpp - Reproduce.cpp Resolver.cpp SymbolTable.cpp - TargetOptionsCommandFlags.cpp Writer.cpp ADDITIONAL_HEADER_DIRS Index: lld/lib/Core/Resolver.cpp =================================================================== --- lld/lib/Core/Resolver.cpp +++ 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" Index: lld/lib/Core/SymbolTable.cpp =================================================================== --- lld/lib/Core/SymbolTable.cpp +++ 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" Index: lld/lib/Driver/DarwinLdDriver.cpp =================================================================== --- lld/lib/Driver/DarwinLdDriver.cpp +++ 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" Index: lld/lib/ReaderWriter/FileArchive.cpp =================================================================== --- lld/lib/ReaderWriter/FileArchive.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/ArchHandler.h =================================================================== --- lld/lib/ReaderWriter/MachO/ArchHandler.h +++ 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" Index: lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/GOTPass.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/GOTPass.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFile.h =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFile.h +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/ObjCPass.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/ObjCPass.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/ShimPass.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/ShimPass.cpp +++ 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" Index: lld/lib/ReaderWriter/MachO/StubsPass.cpp =================================================================== --- lld/lib/ReaderWriter/MachO/StubsPass.cpp +++ 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" Index: lld/tools/lld/lld.cpp =================================================================== --- lld/tools/lld/lld.cpp +++ 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" Index: lld/unittests/DriverTests/DarwinLdDriverTest.cpp =================================================================== --- lld/unittests/DriverTests/DarwinLdDriverTest.cpp +++ 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"