[PATCH] D74385: [ARCMT][NFC] Reduce #include dependencies
Nicolás Alvarez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 22:49:19 PST 2020
nicolas17 created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74385
Files:
clang/lib/ARCMigrate/ARCMT.cpp
clang/lib/ARCMigrate/Internals.h
clang/lib/ARCMigrate/Transforms.cpp
Index: clang/lib/ARCMigrate/Transforms.cpp
===================================================================
--- clang/lib/ARCMigrate/Transforms.cpp
+++ 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"
Index: clang/lib/ARCMigrate/Internals.h
===================================================================
--- clang/lib/ARCMigrate/Internals.h
+++ 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;
Index: clang/lib/ARCMigrate/ARCMT.cpp
===================================================================
--- clang/lib/ARCMigrate/ARCMT.cpp
+++ 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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74385.243737.patch
Type: text/x-patch
Size: 1500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200211/9f5cfb77/attachment.bin>
More information about the cfe-commits
mailing list