Index: COFF/InputFiles.cpp =================================================================== --- COFF/InputFiles.cpp +++ COFF/InputFiles.cpp @@ -8,25 +8,35 @@ //===----------------------------------------------------------------------===// #include "Chunks.h" +#include "Config.h" #include "Error.h" #include "InputFiles.h" #include "Symbols.h" -#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/Triple.h" +#include "llvm/ADT/Twine.h" #include "llvm/IR/LLVMContext.h" #include "llvm/LTO/LTOModule.h" +#include "llvm/Object/Binary.h" #include "llvm/Object/COFF.h" #include "llvm/Support/COFF.h" -#include "llvm/Support/Debug.h" +#include "llvm/Support/Casting.h" #include "llvm/Support/Endian.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/ErrorOr.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm-c/lto.h" +#include +#include +#include using namespace llvm::COFF; using namespace llvm::object; using namespace llvm::support::endian; + using llvm::Triple; using llvm::support::ulittle32_t; -using llvm::sys::fs::file_magic; -using llvm::sys::fs::identify_magic; namespace lld { namespace coff { Index: lib/ReaderWriter/FileArchive.cpp =================================================================== --- lib/ReaderWriter/FileArchive.cpp +++ lib/ReaderWriter/FileArchive.cpp @@ -8,25 +8,27 @@ //===----------------------------------------------------------------------===// #include "lld/Core/ArchiveLibraryFile.h" +#include "lld/Core/File.h" #include "lld/Core/LLVM.h" -#include "lld/Core/LinkingContext.h" -#include "lld/Driver/Driver.h" -#include "llvm/ADT/Hashing.h" +#include "lld/Core/Reader.h" #include "llvm/ADT/StringRef.h" #include "llvm/Object/Archive.h" -#include "llvm/Object/ObjectFile.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/Format.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Object/Error.h" +#include "llvm/Support/ErrorOr.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/raw_ostream.h" #include #include +#include +#include #include +#include +#include using llvm::object::Archive; -using llvm::object::ObjectFile; -using llvm::object::SymbolRef; -using llvm::object::symbol_iterator; -using llvm::object::object_error; namespace lld { @@ -213,4 +215,4 @@ add(std::unique_ptr(new ArchiveReader(logLoading))); } -} // end namespace lld +} // namespace lld Index: unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp =================================================================== --- unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp +++ unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp @@ -9,11 +9,17 @@ #include "gtest/gtest.h" #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h" +#include "lld/ReaderWriter/MachOLinkingContext.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Error.h" #include "llvm/Support/MachO.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/YAMLTraits.h" +#include +#include using llvm::StringRef; using llvm::MemoryBuffer; -using llvm::ErrorOr; using namespace lld::mach_o::normalized; using namespace llvm::MachO; Index: unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp =================================================================== --- unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp +++ unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp @@ -9,10 +9,18 @@ #include "gtest/gtest.h" #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h" +#include "lld/Core/Atom.h" +#include "lld/Core/DefinedAtom.h" +#include "lld/Core/File.h" +#include "lld/Core/UndefinedAtom.h" +#include "lld/ReaderWriter/MachOLinkingContext.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/Support/Error.h" #include "llvm/Support/MachO.h" +#include "llvm/Support/YAMLTraits.h" +#include +#include -using llvm::ErrorOr; - using namespace lld::mach_o::normalized; using namespace llvm::MachO; Index: unittests/MachOTests/MachONormalizedFileYAMLTests.cpp =================================================================== --- unittests/MachOTests/MachONormalizedFileYAMLTests.cpp +++ unittests/MachOTests/MachONormalizedFileYAMLTests.cpp @@ -9,11 +9,19 @@ #include "gtest/gtest.h" #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h" +#include "lld/ReaderWriter/MachOLinkingContext.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Error.h" #include "llvm/Support/MachO.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/raw_ostream.h" +#include +#include +#include +#include using llvm::StringRef; using llvm::MemoryBuffer; -using llvm::ErrorOr; using lld::mach_o::normalized::NormalizedFile; using lld::mach_o::normalized::Symbol; using lld::mach_o::normalized::Section;