[PATCH] D62458: Frontend: Add CompilerInvocation and DiagnosticsEngine to the builder

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 25 15:45:36 PDT 2019


dexonsmith created this revision.
dexonsmith added a reviewer: rsmith.
Herald added subscribers: kadircet, arphaman, jkorous.
dexonsmith added a parent revision: D62457: Frontend: Create basic CompilerInstanceBuilder.

Add CompilerInvocation and DiagnosticsEngine to the new builder,
replacing a number of no-longer-needed `CompilerInstance` mutators.
These are in the same commit because the construction of a
`CompilerInvocation` and a `DiagnosticsEngine` is interestingly
entangled, since they each can depend on the other.  When the dependency
is truly cyclic, a temporary `DiagnosticsEngine` is used to construct
the `CompilerInvocation`, then the latter to construct the "real"
`DiagnosticsEngine` and the former's diagnostics are replayed.


https://reviews.llvm.org/D62458

Files:
  clang-tools-extra/clang-include-fixer/IncludeFixer.cpp
  clang-tools-extra/clangd/Compiler.cpp
  clang/examples/clang-interpreter/main.cpp
  clang/include/clang/Frontend/CompilerInstance.h
  clang/include/clang/Frontend/CompilerInstanceBuilder.h
  clang/include/clang/Frontend/CompilerInvocation.h
  clang/lib/Frontend/ASTUnit.cpp
  clang/lib/Frontend/ChainedIncludesSource.cpp
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Frontend/PrecompiledPreamble.cpp
  clang/lib/Frontend/Rewrite/FrontendActions.cpp
  clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
  clang/lib/Tooling/Tooling.cpp
  clang/tools/clang-import-test/clang-import-test.cpp
  clang/tools/driver/cc1_main.cpp
  clang/unittests/AST/ExternalASTSourceTest.cpp
  clang/unittests/CodeGen/BufferSourceTest.cpp
  clang/unittests/CodeGen/CodeGenExternalTest.cpp
  clang/unittests/CodeGen/IncrementalProcessingTest.cpp
  clang/unittests/CodeGen/TBAAMetadataTest.cpp
  clang/unittests/Frontend/CodeGenActionTest.cpp
  clang/unittests/Frontend/CompilerInstanceTest.cpp
  clang/unittests/Frontend/FrontendActionTest.cpp
  clang/unittests/Frontend/OutputStreamTest.cpp
  clang/unittests/Tooling/Syntax/TokensTest.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62458.201426.patch
Type: text/x-patch
Size: 45346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190525/2e1250bc/attachment-0001.bin>


More information about the cfe-commits mailing list