소스 검색

[NFC] Header cleanup

Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

Differential Revision: https://reviews.llvm.org/D20100

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
Mehdi Amini 9 년 전
부모
커밋
2e23251d3e
100개의 변경된 파일54개의 추가작업 그리고 178개의 파일을 삭제
  1. 0 2
      include/clang/AST/ASTConsumer.h
  2. 0 1
      include/clang/AST/ASTVector.h
  3. 0 2
      include/clang/AST/Attr.h
  4. 0 2
      include/clang/AST/CXXInheritance.h
  5. 0 1
      include/clang/AST/CommentLexer.h
  6. 0 1
      include/clang/AST/DeclTemplate.h
  7. 4 4
      include/clang/AST/Mangle.h
  8. 0 1
      include/clang/AST/MangleNumberingContext.h
  9. 0 1
      include/clang/AST/Redeclarable.h
  10. 0 1
      include/clang/AST/UnresolvedSet.h
  11. 0 1
      include/clang/AST/VTTBuilder.h
  12. 0 1
      include/clang/AST/VTableBuilder.h
  13. 0 1
      include/clang/ASTMatchers/ASTMatchers.h
  14. 0 1
      include/clang/ASTMatchers/Dynamic/VariantValue.h
  15. 0 1
      include/clang/Analysis/Analyses/LiveVariables.h
  16. 0 3
      include/clang/Basic/OpenCLOptions.h
  17. 0 1
      include/clang/Basic/PlistSupport.h
  18. 0 1
      include/clang/Basic/SourceManager.h
  19. 0 1
      include/clang/Basic/TargetCXXABI.h
  20. 0 1
      include/clang/Basic/TargetInfo.h
  21. 1 0
      include/clang/CodeGen/ModuleBuilder.h
  22. 0 1
      include/clang/CodeGen/SwiftCallingConv.h
  23. 0 1
      include/clang/Driver/Compilation.h
  24. 2 4
      include/clang/Driver/Driver.h
  25. 0 1
      include/clang/Driver/Multilib.h
  26. 0 1
      include/clang/Driver/ToolChain.h
  27. 0 1
      include/clang/Edit/Rewriters.h
  28. 0 5
      include/clang/Frontend/ASTUnit.h
  29. 2 2
      include/clang/Frontend/CompilerInstance.h
  30. 6 6
      include/clang/Frontend/CompilerInvocation.h
  31. 0 1
      include/clang/Frontend/DiagnosticRenderer.h
  32. 0 1
      include/clang/Frontend/SerializedDiagnosticReader.h
  33. 1 3
      include/clang/Lex/PPCallbacks.h
  34. 0 5
      include/clang/Lex/PTHManager.h
  35. 0 1
      include/clang/Lex/PreprocessingRecord.h
  36. 0 1
      include/clang/Lex/PreprocessorOptions.h
  37. 0 1
      include/clang/Sema/Initialization.h
  38. 0 1
      include/clang/Sema/Ownership.h
  39. 6 7
      include/clang/Serialization/ASTReader.h
  40. 2 5
      include/clang/Serialization/ASTWriter.h
  41. 0 1
      include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
  42. 0 1
      include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
  43. 0 1
      include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
  44. 0 1
      include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
  45. 0 3
      include/clang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h
  46. 2 3
      include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
  47. 4 3
      include/clang/Tooling/FileMatchTrie.h
  48. 0 1
      include/clang/Tooling/ReplacementsYaml.h
  49. 1 0
      lib/ARCMigrate/ARCMT.cpp
  50. 0 5
      lib/ARCMigrate/Transforms.cpp
  51. 0 2
      lib/AST/APValue.cpp
  52. 0 1
      lib/AST/ASTContext.cpp
  53. 0 1
      lib/AST/ASTDiagnostic.cpp
  54. 1 2
      lib/AST/AttrImpl.cpp
  55. 0 1
      lib/AST/CXXInheritance.cpp
  56. 1 2
      lib/AST/Comment.cpp
  57. 0 1
      lib/AST/CommentBriefParser.cpp
  58. 0 1
      lib/AST/DeclBase.cpp
  59. 0 1
      lib/AST/DeclGroup.cpp
  60. 1 2
      lib/AST/DeclarationName.cpp
  61. 0 1
      lib/AST/Expr.cpp
  62. 0 1
      lib/AST/ExprConstant.cpp
  63. 1 2
      lib/AST/Type.cpp
  64. 0 1
      lib/AST/TypeLoc.cpp
  65. 0 1
      lib/ASTMatchers/Dynamic/Parser.cpp
  66. 1 4
      lib/Analysis/Consumed.cpp
  67. 0 1
      lib/Analysis/FormatStringParsing.h
  68. 1 3
      lib/Analysis/ThreadSafety.cpp
  69. 0 6
      lib/Analysis/ThreadSafetyCommon.cpp
  70. 1 1
      lib/Basic/DiagnosticOptions.cpp
  71. 0 3
      lib/Basic/FileManager.cpp
  72. 0 1
      lib/Basic/SourceLocation.cpp
  73. 0 1
      lib/Basic/SourceManager.cpp
  74. 1 2
      lib/CodeGen/CGAtomic.cpp
  75. 0 4
      lib/CodeGen/CGBlocks.h
  76. 0 1
      lib/CodeGen/CGCall.h
  77. 0 3
      lib/CodeGen/CGExprComplex.cpp
  78. 0 1
      lib/CodeGen/CGLoopInfo.h
  79. 1 4
      lib/CodeGen/CGVTables.cpp
  80. 0 1
      lib/CodeGen/CodeGenAction.cpp
  81. 0 1
      lib/CodeGen/CodeGenModule.cpp
  82. 0 2
      lib/CodeGen/CodeGenPGO.h
  83. 3 3
      lib/CodeGen/CodeGenTypes.h
  84. 0 1
      lib/CodeGen/CoverageMappingGen.h
  85. 1 0
      lib/Driver/CrossWindowsToolChain.cpp
  86. 0 1
      lib/Driver/Driver.cpp
  87. 3 2
      lib/Driver/Job.cpp
  88. 1 0
      lib/Driver/MSVCToolChain.cpp
  89. 0 2
      lib/Driver/Multilib.cpp
  90. 3 3
      lib/Driver/ToolChain.cpp
  91. 0 1
      lib/Driver/ToolChains.h
  92. 0 1
      lib/Format/ContinuationIndenter.cpp
  93. 0 1
      lib/Format/Format.cpp
  94. 1 2
      lib/Format/FormatToken.cpp
  95. 0 1
      lib/Format/TokenAnnotator.h
  96. 1 0
      lib/Format/UnwrappedLineFormatter.cpp
  97. 0 2
      lib/Format/UnwrappedLineFormatter.h
  98. 0 1
      lib/Frontend/ASTConsumers.cpp
  99. 0 1
      lib/Frontend/ASTUnit.cpp
  100. 1 2
      lib/Frontend/CacheTokens.cpp

+ 0 - 2
include/clang/AST/ASTConsumer.h

@@ -14,8 +14,6 @@
 #ifndef LLVM_CLANG_AST_ASTCONSUMER_H
 #define LLVM_CLANG_AST_ASTCONSUMER_H
 
-#include "llvm/ADT/StringRef.h"
-
 namespace clang {
   class ASTContext;
   class CXXMethodDecl;

+ 0 - 1
include/clang/AST/ASTVector.h

@@ -20,7 +20,6 @@
 
 #include "clang/AST/AttrIterator.h"
 #include "llvm/ADT/PointerIntPair.h"
-#include "llvm/Support/Allocator.h"
 #include "llvm/Support/type_traits.h"
 #include <algorithm>
 #include <cstring>

+ 0 - 2
include/clang/AST/Attr.h

@@ -24,8 +24,6 @@
 #include "clang/Basic/Sanitizers.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/VersionTuple.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"

+ 0 - 2
include/clang/AST/CXXInheritance.h

@@ -16,7 +16,6 @@
 
 #include "clang/AST/DeclBase.h"
 #include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclarationName.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeOrdering.h"
 #include "llvm/ADT/MapVector.h"
@@ -24,7 +23,6 @@
 #include "llvm/ADT/SmallVector.h"
 #include <cassert>
 #include <list>
-#include <map>
 
 namespace clang {
   

+ 0 - 1
include/clang/AST/CommentLexer.h

@@ -17,7 +17,6 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/raw_ostream.h"

+ 0 - 1
include/clang/AST/DeclTemplate.h

@@ -21,7 +21,6 @@
 #include "llvm/ADT/PointerUnion.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/TrailingObjects.h"
-#include <limits>
 #include <utility>
 
 namespace clang {

+ 4 - 4
include/clang/AST/Mangle.h

@@ -14,14 +14,14 @@
 #ifndef LLVM_CLANG_AST_MANGLE_H
 #define LLVM_CLANG_AST_MANGLE_H
 
-#include "clang/AST/Decl.h"
 #include "clang/AST/Type.h"
 #include "clang/Basic/ABI.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Casting.h"
-#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+  class raw_ostream;
+}
 
 namespace clang {
   class ASTContext;

+ 0 - 1
include/clang/AST/MangleNumberingContext.h

@@ -16,7 +16,6 @@
 #define LLVM_CLANG_AST_MANGLENUMBERINGCONTEXT_H
 
 #include "clang/Basic/LLVM.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 
 namespace clang {

+ 0 - 1
include/clang/AST/Redeclarable.h

@@ -15,7 +15,6 @@
 #define LLVM_CLANG_AST_REDECLARABLE_H
 
 #include "clang/AST/ExternalASTSource.h"
-#include "llvm/ADT/PointerIntPair.h"
 #include "llvm/Support/Casting.h"
 #include <iterator>
 

+ 0 - 1
include/clang/AST/UnresolvedSet.h

@@ -17,7 +17,6 @@
 
 #include "clang/AST/DeclAccessPair.h"
 #include "clang/Basic/LLVM.h"
-#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/iterator.h"
 

+ 0 - 1
include/clang/AST/VTTBuilder.h

@@ -20,7 +20,6 @@
 #include "clang/AST/GlobalDecl.h"
 #include "clang/AST/RecordLayout.h"
 #include "clang/Basic/ABI.h"
-#include "llvm/ADT/SetVector.h"
 #include <utility>
 
 namespace clang {

+ 0 - 1
include/clang/AST/VTableBuilder.h

@@ -20,7 +20,6 @@
 #include "clang/AST/RecordLayout.h"
 #include "clang/Basic/ABI.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SetVector.h"
 #include <memory>
 #include <utility>
 

+ 0 - 1
include/clang/ASTMatchers/ASTMatchers.h

@@ -51,7 +51,6 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/ASTMatchers/ASTMatchersInternal.h"
 #include "clang/ASTMatchers/ASTMatchersMacros.h"
-#include "llvm/ADT/Twine.h"
 #include "llvm/Support/Regex.h"
 #include <iterator>
 

+ 0 - 1
include/clang/ASTMatchers/Dynamic/VariantValue.h

@@ -21,7 +21,6 @@
 #include "clang/ASTMatchers/ASTMatchersInternal.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ADT/Twine.h"
 #include <memory>
 #include <vector>
 

+ 0 - 1
include/clang/Analysis/Analyses/LiveVariables.h

@@ -16,7 +16,6 @@
 
 #include "clang/AST/Decl.h"
 #include "clang/Analysis/AnalysisContext.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/ImmutableSet.h"
 
 namespace clang {

+ 0 - 3
include/clang/Basic/OpenCLOptions.h

@@ -15,9 +15,6 @@
 #ifndef LLVM_CLANG_BASIC_OPENCLOPTIONS_H
 #define LLVM_CLANG_BASIC_OPENCLOPTIONS_H
 
-#include <string>
-#include <vector>
-
 namespace clang {
 
 /// \brief OpenCL supported extensions and optional core features

+ 0 - 1
include/clang/Basic/PlistSupport.h

@@ -10,7 +10,6 @@
 #ifndef LLVM_CLANG_BASIC_PLISTSUPPORT_H
 #define LLVM_CLANG_BASIC_PLISTSUPPORT_H
 
-#include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/raw_ostream.h"
 

+ 0 - 1
include/clang/Basic/SourceManager.h

@@ -44,7 +44,6 @@
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/PointerIntPair.h"
-#include "llvm/ADT/PointerUnion.h"
 #include "llvm/Support/AlignOf.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/DataTypes.h"

+ 0 - 1
include/clang/Basic/TargetCXXABI.h

@@ -16,7 +16,6 @@
 #ifndef LLVM_CLANG_BASIC_TARGETCXXABI_H
 #define LLVM_CLANG_BASIC_TARGETCXXABI_H
 
-#include "llvm/ADT/Triple.h"
 #include "llvm/Support/ErrorHandling.h"
 
 namespace clang {

+ 0 - 1
include/clang/Basic/TargetInfo.h

@@ -26,7 +26,6 @@
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/Support/DataTypes.h"

+ 1 - 0
include/clang/CodeGen/ModuleBuilder.h

@@ -20,6 +20,7 @@ namespace llvm {
   class Constant;
   class LLVMContext;
   class Module;
+  class StringRef;
 }
 
 namespace clang {

+ 0 - 1
include/clang/CodeGen/SwiftCallingConv.h

@@ -17,7 +17,6 @@
 #include "clang/AST/CanonicalType.h"
 #include "clang/AST/CharUnits.h"
 #include "clang/AST/Type.h"
-#include "llvm/ADT/FoldingSet.h"
 #include "llvm/Support/TrailingObjects.h"
 #include <cassert>
 

+ 0 - 1
include/clang/Driver/Compilation.h

@@ -14,7 +14,6 @@
 #include "clang/Driver/Job.h"
 #include "clang/Driver/Util.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/Support/Path.h"
 #include <map>
 
 namespace llvm {

+ 2 - 4
include/clang/Driver/Driver.h

@@ -17,16 +17,14 @@
 #include "clang/Driver/Util.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/Support/Path.h" // FIXME: Kill when CompilationInfo lands.
 
 #include <list>
 #include <map>
-#include <memory>
-#include <set>
 #include <string>
 
 namespace llvm {
+class Triple;
+
 namespace opt {
   class Arg;
   class ArgList;

+ 0 - 1
include/clang/Driver/Multilib.h

@@ -12,7 +12,6 @@
 
 #include "clang/Basic/LLVM.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
 #include "llvm/Option/Option.h"
 #include <functional>
 #include <string>

+ 0 - 1
include/clang/Driver/ToolChain.h

@@ -18,7 +18,6 @@
 #include "clang/Driver/Util.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Triple.h"
-#include "llvm/Support/Path.h"
 #include "llvm/Target/TargetOptions.h"
 #include <memory>
 #include <string>

+ 0 - 1
include/clang/Edit/Rewriters.h

@@ -9,7 +9,6 @@
 
 #ifndef LLVM_CLANG_EDIT_REWRITERS_H
 #define LLVM_CLANG_EDIT_REWRITERS_H
-#include "llvm/ADT/SmallVector.h"
 
 namespace clang {
   class ObjCMessageExpr;

+ 0 - 5
include/clang/Frontend/ASTUnit.h

@@ -16,7 +16,6 @@
 
 #include "clang-c/Index.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemOptions.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceManager.h"
@@ -30,9 +29,7 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/Support/MD5.h"
-#include "llvm/Support/Path.h"
 #include <cassert>
-#include <map>
 #include <memory>
 #include <string>
 #include <sys/types.h>
@@ -47,7 +44,6 @@ namespace clang {
 class Sema;
 class ASTContext;
 class ASTReader;
-class CodeCompleteConsumer;
 class CompilerInvocation;
 class CompilerInstance;
 class Decl;
@@ -58,7 +54,6 @@ class HeaderSearch;
 class Preprocessor;
 class PCHContainerOperations;
 class PCHContainerReader;
-class SourceManager;
 class TargetInfo;
 class FrontendAction;
 class ASTDeserializationListener;

+ 2 - 2
include/clang/Frontend/CompilerInstance.h

@@ -11,11 +11,12 @@
 #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_
 
 #include "clang/AST/ASTConsumer.h"
-#include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Frontend/CompilerInvocation.h"
+#include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/Frontend/Utils.h"
+#include "clang/Lex/HeaderSearchOptions.h"
 #include "clang/Lex/ModuleLoader.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"
@@ -35,7 +36,6 @@ class TimerGroup;
 
 namespace clang {
 class ASTContext;
-class ASTConsumer;
 class ASTReader;
 class CodeCompleteConsumer;
 class DiagnosticsEngine;

+ 6 - 6
include/clang/Frontend/CompilerInvocation.h

@@ -13,29 +13,29 @@
 #include "clang/Basic/DiagnosticOptions.h"
 #include "clang/Basic/FileSystemOptions.h"
 #include "clang/Basic/LangOptions.h"
-#include "clang/Basic/TargetOptions.h"
 #include "clang/Frontend/CodeGenOptions.h"
 #include "clang/Frontend/DependencyOutputOptions.h"
 #include "clang/Frontend/FrontendOptions.h"
 #include "clang/Frontend/LangStandard.h"
 #include "clang/Frontend/MigratorOptions.h"
 #include "clang/Frontend/PreprocessorOutputOptions.h"
-#include "clang/Lex/HeaderSearchOptions.h"
-#include "clang/Lex/PreprocessorOptions.h"
 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringRef.h"
 #include <string>
-#include <vector>
 
 namespace llvm {
+class Triple;
+
 namespace opt {
 class ArgList;
 }
 }
 
 namespace clang {
+class PreprocessorOptions;
+class HeaderSearchOptions;
+class TargetOptions;
+class LangOptions;
 class CompilerInvocation;
 class DiagnosticsEngine;
 

+ 0 - 1
include/clang/Frontend/DiagnosticRenderer.h

@@ -19,7 +19,6 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/SourceLocation.h"
-#include "llvm/ADT/Optional.h"
 #include "llvm/ADT/PointerUnion.h"
 
 namespace clang {

+ 0 - 1
include/clang/Frontend/SerializedDiagnosticReader.h

@@ -11,7 +11,6 @@
 #define LLVM_CLANG_FRONTEND_SERIALIZED_DIAGNOSTIC_READER_H_
 
 #include "clang/Basic/LLVM.h"
-#include "llvm/ADT/ArrayRef.h"
 #include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Support/ErrorOr.h"
 

+ 1 - 3
include/clang/Lex/PPCallbacks.h

@@ -17,14 +17,12 @@
 
 #include "clang/Basic/DiagnosticIDs.h"
 #include "clang/Basic/SourceLocation.h"
-#include "clang/Lex/DirectoryLookup.h"
+#include "clang/Basic/SourceManager.h"
 #include "clang/Lex/ModuleLoader.h"
 #include "clang/Lex/Pragma.h"
 #include "llvm/ADT/StringRef.h"
-#include <string>
 
 namespace clang {
-  class SourceLocation;
   class Token;
   class IdentifierInfo;
   class MacroDefinition;

+ 0 - 5
include/clang/Lex/PTHManager.h

@@ -14,15 +14,10 @@
 #ifndef LLVM_CLANG_LEX_PTHMANAGER_H
 #define LLVM_CLANG_LEX_PTHMANAGER_H
 
-#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/LangOptions.h"
-#include "clang/Lex/PTHLexer.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/OnDiskHashTable.h"
-#include <string>
 
 namespace llvm {
   class MemoryBuffer;

+ 0 - 1
include/clang/Lex/PreprocessingRecord.h

@@ -19,7 +19,6 @@
 #include "clang/Lex/PPCallbacks.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/iterator.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Compiler.h"

+ 0 - 1
include/clang/Lex/PreprocessorOptions.h

@@ -12,7 +12,6 @@
 
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSet.h"
 #include <cassert>

+ 0 - 1
include/clang/Sema/Initialization.h

@@ -20,7 +20,6 @@
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Sema/Overload.h"
 #include "clang/Sema/Ownership.h"
-#include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/SmallVector.h"
 #include <cassert>
 

+ 0 - 1
include/clang/Sema/Ownership.h

@@ -17,7 +17,6 @@
 #include "clang/AST/Expr.h"
 #include "clang/Basic/LLVM.h"
 #include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/PointerIntPair.h"
 
 //===----------------------------------------------------------------------===//
 // OpaquePtr

+ 6 - 7
include/clang/Serialization/ASTReader.h

@@ -18,10 +18,8 @@
 #include "clang/AST/DeclarationName.h"
 #include "clang/AST/TemplateBase.h"
 #include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemOptions.h"
 #include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Version.h"
 #include "clang/Lex/ExternalPreprocessorSource.h"
 #include "clang/Lex/HeaderSearch.h"
@@ -33,9 +31,6 @@
 #include "clang/Serialization/Module.h"
 #include "clang/Serialization/ModuleFileExtension.h"
 #include "clang/Serialization/ModuleManager.h"
-#include "llvm/ADT/APFloat.h"
-#include "llvm/ADT/APInt.h"
-#include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallSet.h"
@@ -43,11 +38,9 @@
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/TinyPtrVector.h"
-#include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Timer.h"
 #include <deque>
-#include <map>
 #include <memory>
 #include <string>
 #include <utility>
@@ -55,10 +48,16 @@
 
 namespace llvm {
   class MemoryBuffer;
+  class APInt;
+  class APSInt;
+  class APFloat;
 }
 
 namespace clang {
 
+class SourceManager;
+class HeaderSearchOptions;
+class FileManager;
 class AddrLabelExpr;
 class ASTConsumer;
 class ASTContext;

+ 2 - 5
include/clang/Serialization/ASTWriter.h

@@ -16,9 +16,8 @@
 
 #include "clang/AST/ASTMutationListener.h"
 #include "clang/AST/Decl.h"
-#include "clang/AST/DeclarationName.h"
-#include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/AST/TemplateBase.h"
+#include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/Sema/SemaConsumer.h"
 #include "clang/Serialization/ASTBitCodes.h"
 #include "clang/Serialization/ASTDeserializationListener.h"
@@ -26,21 +25,19 @@
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SetVector.h"
-#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Bitcode/BitstreamWriter.h"
-#include <map>
 #include <queue>
 #include <vector>
 
 namespace llvm {
   class APFloat;
   class APInt;
-  class BitstreamWriter;
 }
 
 namespace clang {
 
+class DeclarationName;
 class ASTContext;
 class Attr;
 class NestedNameSpecifier;

+ 0 - 1
include/clang/StaticAnalyzer/Core/BugReporter/BugType.h

@@ -17,7 +17,6 @@
 #include "clang/Basic/LLVM.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h"
 #include "clang/StaticAnalyzer/Core/Checker.h"
-#include "llvm/ADT/FoldingSet.h"
 #include <string>
 
 namespace clang {

+ 0 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

@@ -28,7 +28,6 @@
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/GraphTraits.h"
 #include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
 #include <memory>

+ 0 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h

@@ -24,7 +24,6 @@
 #include "clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/ImmutableMap.h"
-#include "llvm/ADT/PointerIntPair.h"
 #include "llvm/Support/Allocator.h"
 #include <utility>
 

+ 0 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/Store.h

@@ -18,7 +18,6 @@
 #include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h"
 #include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/Optional.h"
 
 namespace clang {
 

+ 0 - 3
include/clang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h

@@ -15,9 +15,6 @@
 #ifndef LLVM_CLANG_GR_SUMMARY
 #define LLVM_CLANG_GR_SUMMARY
 
-#include "llvm/ADT/FoldingSet.h"
-#include "llvm/Support/Allocator.h"
-
 namespace clang {
 
 namespace ento {

+ 2 - 3
include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h

@@ -17,9 +17,7 @@
 
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Basic/LLVM.h"
-#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
-#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
-#include <string>
+#include <memory>
 
 namespace clang {
 
@@ -29,6 +27,7 @@ class CodeInjector;
 class CompilerInstance;
 
 namespace ento {
+class PathDiagnosticConsumer;
 class CheckerManager;
 
 class AnalysisASTConsumer : public ASTConsumer {

+ 4 - 3
include/clang/Tooling/FileMatchTrie.h

@@ -16,10 +16,11 @@
 #define LLVM_CLANG_TOOLING_FILEMATCHTRIE_H
 
 #include "clang/Basic/LLVM.h"
-#include "llvm/ADT/StringRef.h"
 #include <memory>
-#include <string>
-#include <vector>
+
+namespace llvm {
+class StringRef;
+}
 
 namespace clang {
 namespace tooling {

+ 0 - 1
include/clang/Tooling/ReplacementsYaml.h

@@ -19,7 +19,6 @@
 #include "clang/Tooling/Refactoring.h"
 #include "llvm/Support/YAMLTraits.h"
 #include <string>
-#include <vector>
 
 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::Replacement)
 

+ 1 - 0
lib/ARCMigrate/ARCMT.cpp

@@ -16,6 +16,7 @@
 #include "clang/Frontend/TextDiagnosticPrinter.h"
 #include "clang/Frontend/Utils.h"
 #include "clang/Lex/Preprocessor.h"
+#include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Rewrite/Core/Rewriter.h"
 #include "clang/Sema/SemaDiagnostic.h"
 #include "clang/Serialization/ASTReader.h"

+ 0 - 5
lib/ARCMigrate/Transforms.cpp

@@ -11,17 +11,12 @@
 #include "Internals.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/RecursiveASTVisitor.h"
-#include "clang/AST/StmtVisitor.h"
 #include "clang/Analysis/DomainSpecific/CocoaConventions.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Lex/Preprocessor.h"
 #include "clang/Sema/Sema.h"
-#include "clang/Sema/SemaDiagnostic.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/StringSwitch.h"
-#include <map>
 
 using namespace clang;
 using namespace arcmt;

+ 0 - 2
lib/AST/APValue.cpp

@@ -17,8 +17,6 @@
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/Type.h"
-#include "clang/Basic/Diagnostic.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace clang;

+ 0 - 1
lib/AST/ASTContext.cpp

@@ -34,7 +34,6 @@
 #include "clang/Basic/Builtins.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/Capacity.h"

+ 0 - 1
lib/AST/ASTDiagnostic.cpp

@@ -20,7 +20,6 @@
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/TemplateBase.h"
 #include "clang/AST/Type.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/Support/raw_ostream.h"
 
 using namespace clang;

+ 1 - 2
lib/AST/AttrImpl.cpp

@@ -11,11 +11,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/Attr.h"
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/Attr.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/Type.h"
-#include "llvm/ADT/StringSwitch.h"
 using namespace clang;
 
 #include "clang/AST/AttrImpl.inc"

+ 0 - 1
lib/AST/CXXInheritance.cpp

@@ -16,7 +16,6 @@
 #include "clang/AST/RecordLayout.h"
 #include "llvm/ADT/SetVector.h"
 #include <algorithm>
-#include <set>
 
 using namespace clang;
 

+ 1 - 2
lib/AST/Comment.cpp

@@ -7,14 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/ASTContext.h"
 #include "clang/AST/Comment.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/Basic/CharInfo.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
 
 namespace clang {
 namespace comments {

+ 0 - 1
lib/AST/CommentBriefParser.cpp

@@ -9,7 +9,6 @@
 
 #include "clang/AST/CommentBriefParser.h"
 #include "clang/AST/CommentCommandTraits.h"
-#include "llvm/ADT/StringSwitch.h"
 
 namespace clang {
 namespace comments {

+ 0 - 1
lib/AST/DeclBase.cpp

@@ -28,7 +28,6 @@
 #include "clang/AST/StmtCXX.h"
 #include "clang/AST/Type.h"
 #include "clang/Basic/TargetInfo.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 using namespace clang;

+ 0 - 1
lib/AST/DeclGroup.cpp

@@ -14,7 +14,6 @@
 #include "clang/AST/DeclGroup.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
-#include "llvm/Support/Allocator.h"
 using namespace clang;
 
 DeclGroup* DeclGroup::Create(ASTContext &C, Decl **Decls, unsigned NumDecls) {

+ 1 - 2
lib/AST/DeclarationName.cpp

@@ -11,14 +11,13 @@
 // classes.
 //
 //===----------------------------------------------------------------------===//
+#include "clang/AST/DeclarationName.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclarationName.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLoc.h"
 #include "clang/AST/TypeOrdering.h"
 #include "clang/Basic/IdentifierTable.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"

+ 0 - 1
lib/AST/Expr.cpp

@@ -11,7 +11,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/APValue.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/DeclCXX.h"

+ 0 - 1
lib/AST/ExprConstant.cpp

@@ -44,7 +44,6 @@
 #include "clang/AST/TypeLoc.h"
 #include "clang/Basic/Builtins.h"
 #include "clang/Basic/TargetInfo.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cstring>
 #include <functional>

+ 1 - 2
lib/AST/Type.cpp

@@ -11,6 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/AST/Type.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/CharUnits.h"
@@ -19,13 +20,11 @@
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/AST/Type.h"
 #include "clang/AST/TypeVisitor.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TargetInfo.h"
 #include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/StringExtras.h"
-#include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 using namespace clang;
 

+ 0 - 1
lib/AST/TypeLoc.cpp

@@ -16,7 +16,6 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/TypeLocVisitor.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
 using namespace clang;
 
 static const unsigned TypeLocMaxDataAlign = llvm::alignOf<void *>();

+ 0 - 1
lib/ASTMatchers/Dynamic/Parser.cpp

@@ -16,7 +16,6 @@
 #include "clang/ASTMatchers/Dynamic/Registry.h"
 #include "clang/Basic/CharInfo.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ADT/Twine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include <string>
 #include <vector>

+ 1 - 4
lib/Analysis/Consumed.cpp

@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Analysis/Analyses/Consumed.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/DeclCXX.h"
@@ -20,16 +21,12 @@
 #include "clang/AST/StmtCXX.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/AST/Type.h"
-#include "clang/Analysis/Analyses/Consumed.h"
 #include "clang/Analysis/Analyses/PostOrderCFGView.h"
 #include "clang/Analysis/AnalysisContext.h"
 #include "clang/Analysis/CFG.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/raw_ostream.h"
 #include <memory>
 
 // TODO: Adjust states of args to constructors in the same way that arguments to

+ 0 - 1
lib/Analysis/FormatStringParsing.h

@@ -4,7 +4,6 @@
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Type.h"
 #include "clang/Analysis/Analyses/FormatString.h"
-#include "llvm/Support/raw_ostream.h"
 
 namespace clang {
 

+ 1 - 3
lib/Analysis/ThreadSafety.cpp

@@ -15,13 +15,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Analysis/Analyses/ThreadSafety.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/StmtCXX.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/Analysis/Analyses/PostOrderCFGView.h"
-#include "clang/Analysis/Analyses/ThreadSafety.h"
 #include "clang/Analysis/Analyses/ThreadSafetyCommon.h"
 #include "clang/Analysis/Analyses/ThreadSafetyLogical.h"
 #include "clang/Analysis/Analyses/ThreadSafetyTIL.h"
@@ -32,8 +32,6 @@
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
-#include "llvm/ADT/BitVector.h"
-#include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/ImmutableMap.h"
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/SmallVector.h"

+ 0 - 6
lib/Analysis/ThreadSafetyCommon.cpp

@@ -17,20 +17,14 @@
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/StmtCXX.h"
-#include "clang/Analysis/Analyses/PostOrderCFGView.h"
 #include "clang/Analysis/Analyses/ThreadSafetyTIL.h"
 #include "clang/Analysis/Analyses/ThreadSafetyTraverse.h"
 #include "clang/Analysis/AnalysisContext.h"
 #include "clang/Analysis/CFG.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/SourceLocation.h"
-#include "clang/Basic/SourceManager.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include <algorithm>
-#include <climits>
-#include <vector>
 
 using namespace clang;
 using namespace threadSafety;

+ 1 - 1
lib/Basic/DiagnosticOptions.cpp

@@ -16,7 +16,7 @@
 
 namespace clang {
 
-raw_ostream& operator<<(raw_ostream& Out, DiagnosticLevelMask M) {
+raw_ostream &operator<<(raw_ostream &Out, DiagnosticLevelMask M) {
   using UT = std::underlying_type<DiagnosticLevelMask>::type;
   return Out << static_cast<UT>(M);
 }

+ 0 - 3
lib/Basic/FileManager.cpp

@@ -26,10 +26,7 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include <map>
-#include <set>
 #include <string>
-#include <system_error>
 
 using namespace clang;
 

+ 0 - 1
lib/Basic/SourceLocation.cpp

@@ -14,7 +14,6 @@
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/PrettyStackTrace.h"
 #include "clang/Basic/SourceManager.h"
-#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cstdio>
 using namespace clang;

+ 0 - 1
lib/Basic/SourceManager.cpp

@@ -25,7 +25,6 @@
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cstring>
-#include <string>
 
 using namespace clang;
 using namespace SrcMgr;

+ 1 - 2
lib/CodeGen/CGAtomic.cpp

@@ -11,13 +11,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "CodeGenFunction.h"
 #include "CGCall.h"
 #include "CGRecordLayout.h"
+#include "CodeGenFunction.h"
 #include "CodeGenModule.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/CodeGen/CGFunctionInfo.h"
-#include "llvm/ADT/StringExtras.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/IR/Operator.h"

+ 0 - 4
lib/CodeGen/CGBlocks.h

@@ -25,10 +25,8 @@
 #include "clang/AST/ExprObjC.h"
 #include "clang/AST/Type.h"
 #include "clang/Basic/TargetInfo.h"
-#include "llvm/IR/Module.h"
 
 namespace llvm {
-class Module;
 class Constant;
 class Function;
 class GlobalValue;
@@ -40,10 +38,8 @@ class LLVMContext;
 }
 
 namespace clang {
-
 namespace CodeGen {
 
-class CodeGenModule;
 class CGBlockInfo;
 
 // Flags stored in __block variables.

+ 0 - 1
lib/CodeGen/CGCall.h

@@ -19,7 +19,6 @@
 #include "EHScopeStack.h"
 #include "clang/AST/CanonicalType.h"
 #include "clang/AST/Type.h"
-#include "llvm/ADT/FoldingSet.h"
 #include "llvm/IR/Value.h"
 
 // FIXME: Restructure so we don't have to expose so much stuff.

+ 0 - 3
lib/CodeGen/CGExprComplex.cpp

@@ -13,12 +13,9 @@
 
 #include "CodeGenFunction.h"
 #include "CodeGenModule.h"
-#include "clang/AST/ASTContext.h"
 #include "clang/AST/StmtVisitor.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/IR/Constants.h"
-#include "llvm/IR/Function.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/MDBuilder.h"
 #include "llvm/IR/Metadata.h"

+ 0 - 1
lib/CodeGen/CGLoopInfo.h

@@ -16,7 +16,6 @@
 #define LLVM_CLANG_LIB_CODEGEN_CGLOOPINFO_H
 
 #include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/IR/DebugLoc.h"
 #include "llvm/IR/Value.h"

+ 1 - 4
lib/CodeGen/CGVTables.cpp

@@ -11,16 +11,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "CodeGenFunction.h"
 #include "CGCXXABI.h"
+#include "CodeGenFunction.h"
 #include "CodeGenModule.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecordLayout.h"
 #include "clang/CodeGen/CGFunctionInfo.h"
 #include "clang/Frontend/CodeGenOptions.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/SetVector.h"
-#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Transforms/Utils/Cloning.h"
 #include <algorithm>

+ 0 - 1
lib/CodeGen/CodeGenAction.cpp

@@ -21,7 +21,6 @@
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendDiagnostic.h"
 #include "clang/Lex/Preprocessor.h"
-#include "llvm/ADT/SmallString.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/DebugInfo.h"
 #include "llvm/IR/DiagnosticInfo.h"

+ 0 - 1
lib/CodeGen/CodeGenModule.cpp

@@ -43,7 +43,6 @@
 #include "clang/Basic/Version.h"
 #include "clang/Frontend/CodeGenOptions.h"
 #include "clang/Sema/SemaDiagnostic.h"
-#include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/IR/CallSite.h"
 #include "llvm/IR/CallingConv.h"

+ 0 - 2
lib/CodeGen/CodeGenPGO.h

@@ -18,9 +18,7 @@
 #include "CodeGenModule.h"
 #include "CodeGenTypes.h"
 #include "clang/Frontend/CodeGenOptions.h"
-#include "llvm/ADT/StringMap.h"
 #include "llvm/ProfileData/InstrProfReader.h"
-#include "llvm/Support/MemoryBuffer.h"
 #include <array>
 #include <memory>
 

+ 3 - 3
lib/CodeGen/CodeGenTypes.h

@@ -15,15 +15,14 @@
 #define LLVM_CLANG_LIB_CODEGEN_CODEGENTYPES_H
 
 #include "CGCall.h"
-#include "clang/AST/GlobalDecl.h"
+#include "clang/Basic/ABI.h"
 #include "clang/CodeGen/CGFunctionInfo.h"
+#include "clang/Sema/Sema.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/IR/Module.h"
-#include <vector>
 
 namespace llvm {
 class FunctionType;
-class Module;
 class DataLayout;
 class Type;
 class LLVMContext;
@@ -48,6 +47,7 @@ class TagDecl;
 class TargetInfo;
 class Type;
 typedef CanQual<Type> CanQualType;
+class GlobalDecl;
 
 namespace CodeGen {
 class ABIInfo;

+ 0 - 1
lib/CodeGen/CoverageMappingGen.h

@@ -19,7 +19,6 @@
 #include "clang/Frontend/CodeGenOptions.h"
 #include "clang/Lex/PPCallbacks.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/StringMap.h"
 #include "llvm/IR/GlobalValue.h"
 #include "llvm/Support/raw_ostream.h"
 

+ 1 - 0
lib/Driver/CrossWindowsToolChain.cpp

@@ -11,6 +11,7 @@
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/Options.h"
 #include "llvm/Option/ArgList.h"
+#include "llvm/Support/Path.h"
 
 using namespace clang::driver;
 using namespace clang::driver::toolchains;

+ 0 - 1
lib/Driver/Driver.cpp

@@ -32,7 +32,6 @@
 #include "llvm/Option/OptSpecifier.h"
 #include "llvm/Option/OptTable.h"
 #include "llvm/Option/Option.h"
-#include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"

+ 3 - 2
lib/Driver/Job.cpp

@@ -7,18 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Driver/Job.h"
 #include "InputInfo.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/DriverDiagnostic.h"
-#include "clang/Driver/Job.h"
 #include "clang/Driver/Tool.h"
 #include "clang/Driver/ToolChain.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSet.h"
 #include "llvm/ADT/StringSwitch.h"
-#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/Program.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cassert>

+ 1 - 0
lib/Driver/MSVCToolChain.cpp

@@ -22,6 +22,7 @@
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/Process.h"
 #include <cstdio>
 

+ 0 - 2
lib/Driver/Multilib.cpp

@@ -13,12 +13,10 @@
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSet.h"
-#include "llvm/ADT/Triple.h"
 #include "llvm/Option/Arg.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Option/OptTable.h"
 #include "llvm/Option/Option.h"
-#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Regex.h"
 #include "llvm/Support/YAMLParser.h"

+ 3 - 3
lib/Driver/ToolChain.cpp

@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Driver/ToolChain.h"
 #include "Tools.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Config/config.h"
@@ -15,16 +16,15 @@
 #include "clang/Driver/DriverDiagnostic.h"
 #include "clang/Driver/Options.h"
 #include "clang/Driver/SanitizerArgs.h"
-#include "clang/Driver/ToolChain.h"
 #include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringSwitch.h"
 #include "llvm/Option/Arg.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Option/Option.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileSystem.h"
-#include "llvm/Support/TargetRegistry.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/TargetParser.h"
+#include "llvm/Support/TargetRegistry.h"
 
 using namespace clang::driver;
 using namespace clang::driver::tools;

+ 0 - 1
lib/Driver/ToolChains.h

@@ -16,7 +16,6 @@
 #include "clang/Driver/Action.h"
 #include "clang/Driver/Multilib.h"
 #include "clang/Driver/ToolChain.h"
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/Compiler.h"

+ 0 - 1
lib/Format/ContinuationIndenter.cpp

@@ -19,7 +19,6 @@
 #include "clang/Basic/SourceManager.h"
 #include "clang/Format/Format.h"
 #include "llvm/Support/Debug.h"
-#include <string>
 
 #define DEBUG_TYPE "format-formatter"
 

+ 0 - 1
lib/Format/Format.cpp

@@ -36,7 +36,6 @@
 #include "llvm/Support/YAMLTraits.h"
 #include <algorithm>
 #include <memory>
-#include <queue>
 #include <string>
 
 #define DEBUG_TYPE "format-formatter"

+ 1 - 2
lib/Format/FormatToken.cpp

@@ -13,9 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "ContinuationIndenter.h"
 #include "FormatToken.h"
-#include "clang/Format/Format.h"
+#include "ContinuationIndenter.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
 #include <climits>

+ 0 - 1
lib/Format/TokenAnnotator.h

@@ -18,7 +18,6 @@
 
 #include "UnwrappedLineParser.h"
 #include "clang/Format/Format.h"
-#include <string>
 
 namespace clang {
 class SourceManager;

+ 1 - 0
lib/Format/UnwrappedLineFormatter.cpp

@@ -10,6 +10,7 @@
 #include "UnwrappedLineFormatter.h"
 #include "WhitespaceManager.h"
 #include "llvm/Support/Debug.h"
+#include <queue>
 
 #define DEBUG_TYPE "format-formatter"
 

+ 0 - 2
lib/Format/UnwrappedLineFormatter.h

@@ -19,8 +19,6 @@
 #include "ContinuationIndenter.h"
 #include "clang/Format/Format.h"
 #include <map>
-#include <queue>
-#include <string>
 
 namespace clang {
 namespace format {

+ 0 - 1
lib/Frontend/ASTConsumers.cpp

@@ -19,7 +19,6 @@
 #include "clang/AST/RecordLayout.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Timer.h"

+ 0 - 1
lib/Frontend/ASTUnit.cpp

@@ -41,7 +41,6 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Mutex.h"
 #include "llvm/Support/MutexGuard.h"
-#include "llvm/Support/Path.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
 #include <atomic>

+ 1 - 2
lib/Frontend/CacheTokens.cpp

@@ -12,12 +12,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Frontend/Utils.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemStatCache.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/SourceManager.h"
+#include "clang/Frontend/Utils.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Lex/PTHManager.h"
 #include "clang/Lex/Preprocessor.h"
@@ -28,7 +28,6 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/OnDiskHashTable.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/raw_ostream.h"
 
 // FIXME: put this somewhere else?
 #ifndef S_ISDIR

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.