[lld] r267008 - Fix Clang-tidy misc-unused-using-decls and Include What You Use warnings.
Eugene Zelenko via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 10:14:10 PDT 2016
Author: eugenezelenko
Date: Thu Apr 21 12:14:10 2016
New Revision: 267008
URL: http://llvm.org/viewvc/llvm-project?rev=267008&view=rev
Log:
Fix Clang-tidy misc-unused-using-decls and Include What You Use warnings.
Differential revision: http://reviews.llvm.org/D19348
Modified:
lld/trunk/COFF/InputFiles.cpp
lld/trunk/lib/ReaderWriter/FileArchive.cpp
lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=267008&r1=267007&r2=267008&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Thu Apr 21 12:14:10 2016
@@ -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 <cstring>
+#include <system_error>
+#include <utility>
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 {
Modified: lld/trunk/lib/ReaderWriter/FileArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/FileArchive.cpp?rev=267008&r1=267007&r2=267008&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/FileArchive.cpp (original)
+++ lld/trunk/lib/ReaderWriter/FileArchive.cpp Thu Apr 21 12:14:10 2016
@@ -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 <memory>
#include <set>
+#include <string>
+#include <system_error>
#include <unordered_map>
+#include <utility>
+#include <vector>
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 @@ void Registry::addSupportArchives(bool l
add(std::unique_ptr<Reader>(new ArchiveReader(logLoading)));
}
-} // end namespace lld
+} // namespace lld
Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp?rev=267008&r1=267007&r2=267008&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp Thu Apr 21 12:14:10 2016
@@ -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 <cstdint>
+#include <memory>
using llvm::StringRef;
using llvm::MemoryBuffer;
-using llvm::ErrorOr;
using namespace lld::mach_o::normalized;
using namespace llvm::MachO;
Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp?rev=267008&r1=267007&r2=267008&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp Thu Apr 21 12:14:10 2016
@@ -9,9 +9,17 @@
#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"
-
-using llvm::ErrorOr;
+#include "llvm/Support/YAMLTraits.h"
+#include <cstdint>
+#include <memory>
using namespace lld::mach_o::normalized;
using namespace llvm::MachO;
Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp?rev=267008&r1=267007&r2=267008&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp Thu Apr 21 12:14:10 2016
@@ -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 <cstdint>
+#include <memory>
+#include <system_error>
+#include <string>
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;
More information about the llvm-commits
mailing list