aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-10-19 15:17:07 -0700
committerArthur Eubanks <aeubanks@google.com>2021-10-19 20:51:48 -0700
commit063c2f89aa7f5b0b61a63d639d8124035f26935c (patch)
tree9fd374585e0649a3897571469895c1a9fc6e8025 /clang/lib/CodeGen/CodeGenAction.cpp
parent9378ca52ca6ec39fa369349cf06f8ade47657570 (diff)
downloadllvm-063c2f89aa7f5b0b61a63d639d8124035f26935c.zip
llvm-063c2f89aa7f5b0b61a63d639d8124035f26935c.tar.gz
llvm-063c2f89aa7f5b0b61a63d639d8124035f26935c.tar.bz2
[clang] Add option to disable -clear-ast-before-backend
Some downstream users have plugins that -clear-ast-before-backend may affect. Add an option to opt out. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D112100
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 881e30a..52c54d3 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -52,6 +52,8 @@
using namespace clang;
using namespace llvm;
+#define DEBUG_TYPE "codegenaction"
+
namespace clang {
class BackendConsumer;
class ClangDiagnosticHandler final : public DiagnosticHandler {
@@ -352,6 +354,7 @@ namespace clang {
}
if (CodeGenOpts.ClearASTBeforeBackend) {
+ LLVM_DEBUG(llvm::dbgs() << "Clearing AST...\n");
// Access to the AST is no longer available after this.
// Other things that the ASTContext manages are still available, e.g.
// the SourceManager. It'd be nice if we could separate out all the