Author: Nicolás Alvarez
Date: 2020-02-12T19:10:46+01:00
New Revision: 53fba65d220499ebc380755aca2da41a5eb33f02

URL: 
https://github.com/llvm/llvm-project/commit/53fba65d220499ebc380755aca2da41a5eb33f02
DIFF: 
https://github.com/llvm/llvm-project/commit/53fba65d220499ebc380755aca2da41a5eb33f02.diff

LOG: [ARCMT][NFC] Reduce #include dependencies

Replace some #includes in ARCMigrate source files with more specific includes
and forward declarations. This reduces the number of files that need to be
rebuilt when a header changes (and saves like 1 second of build time). For
example, several files no longer need to be rebuilt when the list of static
analyzer checkers(!) changes.

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

Added: 
    

Modified: 
    clang/lib/ARCMigrate/ARCMT.cpp
    clang/lib/ARCMigrate/Internals.h
    clang/lib/ARCMigrate/Transforms.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index 54c32c27b9b4..e18def8a0b19 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -7,6 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include "Internals.h"
+#include "clang/ARCMigrate/ARCMT.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Basic/DiagnosticCategories.h"
 #include "clang/Frontend/ASTUnit.h"

diff  --git a/clang/lib/ARCMigrate/Internals.h 
b/clang/lib/ARCMigrate/Internals.h
index 47fc09317500..ed0136e4867a 100644
--- a/clang/lib/ARCMigrate/Internals.h
+++ b/clang/lib/ARCMigrate/Internals.h
@@ -9,13 +9,15 @@
 #ifndef LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H
 #define LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H
 
-#include "clang/ARCMigrate/ARCMT.h"
+#include "clang/Basic/LangOptions.h"
 #include "clang/Basic/Diagnostic.h"
+#include "clang/Frontend/MigratorOptions.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
 #include <list>
 
 namespace clang {
+  class ASTContext;
   class Sema;
   class Stmt;
 

diff  --git a/clang/lib/ARCMigrate/Transforms.cpp 
b/clang/lib/ARCMigrate/Transforms.cpp
index 59b80a917e56..e274a540e408 100644
--- a/clang/lib/ARCMigrate/Transforms.cpp
+++ b/clang/lib/ARCMigrate/Transforms.cpp
@@ -8,6 +8,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/ARCMigrate/ARCMT.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/Analysis/DomainSpecific/CocoaConventions.h"


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to