[PATCH] D75784: Avoid including Module.h from ExternalASTSource.h

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 6 16:34:21 PST 2020


rnk created this revision.
rnk added reviewers: aaron.ballman, hans.
Herald added projects: clang, LLDB.
Herald added a subscriber: lldb-commits.

Module.h takes 86ms to parse, mostly parsing the class itself. Avoid it
if possible. ASTContext.h depends on ExternalASTSource.h.

A few NFC changes were needed to make this possible:

- Move ASTSourceDescriptor to Module.h. This needs Module to be complete, and seems more related to modules and AST files than external AST sources.
- Move "import complete" bit from Module* pointer int pair to NextLocalImport pointer. Required because PointerIntPair<Module*,...> requires Module to be complete, and now it may not be.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75784

Files:
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/AST/Decl.h
  clang/include/clang/AST/ExternalASTSource.h
  clang/include/clang/Basic/Module.h
  clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/Decl.cpp
  clang/lib/AST/ExternalASTSource.cpp
  clang/lib/AST/ItaniumMangle.cpp
  clang/lib/AST/TextNodeDumper.cpp
  clang/lib/Basic/Module.cpp
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGDebugInfo.h
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTReaderDecl.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.h
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75784.248859.patch
Type: text/x-patch
Size: 20173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200307/88ac8b34/attachment-0001.bin>


More information about the cfe-commits mailing list