Skip to content

Commit 53fba65

Browse files
nicolas17serge-sans-paille
authored andcommitted
[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
1 parent bb310b3 commit 53fba65

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

clang/lib/ARCMigrate/ARCMT.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "Internals.h"
10+
#include "clang/ARCMigrate/ARCMT.h"
1011
#include "clang/AST/ASTConsumer.h"
1112
#include "clang/Basic/DiagnosticCategories.h"
1213
#include "clang/Frontend/ASTUnit.h"

clang/lib/ARCMigrate/Internals.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
#ifndef LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H
1010
#define LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H
1111

12-
#include "clang/ARCMigrate/ARCMT.h"
12+
#include "clang/Basic/LangOptions.h"
1313
#include "clang/Basic/Diagnostic.h"
14+
#include "clang/Frontend/MigratorOptions.h"
1415
#include "llvm/ADT/ArrayRef.h"
1516
#include "llvm/ADT/Optional.h"
1617
#include <list>
1718

1819
namespace clang {
20+
class ASTContext;
1921
class Sema;
2022
class Stmt;
2123

clang/lib/ARCMigrate/Transforms.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "Transforms.h"
1010
#include "Internals.h"
11+
#include "clang/ARCMigrate/ARCMT.h"
1112
#include "clang/AST/ASTContext.h"
1213
#include "clang/AST/RecursiveASTVisitor.h"
1314
#include "clang/Analysis/DomainSpecific/CocoaConventions.h"

0 commit comments

Comments
 (0)