diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-10-17 22:48:35 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-10-18 08:43:32 -0700 |
commit | ab41a1c50558f23e5b6aa7a3b68825f9b4a71fe7 (patch) | |
tree | d18cf333ea49a01cbdf6c33902e37b7440e184fa /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f2c144fc1866c00e88fb923ceccf158060fe03d7 (diff) | |
download | llvm-ab41a1c50558f23e5b6aa7a3b68825f9b4a71fe7.zip llvm-ab41a1c50558f23e5b6aa7a3b68825f9b4a71fe7.tar.gz llvm-ab41a1c50558f23e5b6aa7a3b68825f9b4a71fe7.tar.bz2 |
[clang] Disable -clear-ast-before-backend with -print-stats
We still need access to various things in the ASTContext when printing stats.
Differential Revision: https://reviews.llvm.org/D111973
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 7360e6b..410702d 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -454,6 +454,8 @@ static bool FixupInvocation(CompilerInvocation &Invocation, CodeGenOpts.XRayAlwaysEmitTypedEvents = LangOpts.XRayAlwaysEmitTypedEvents; CodeGenOpts.DisableFree = FrontendOpts.DisableFree; FrontendOpts.GenerateGlobalModuleIndex = FrontendOpts.UseGlobalModuleIndex; + if (FrontendOpts.ShowStats) + CodeGenOpts.ClearASTBeforeBackend = false; LangOpts.SanitizeCoverage = CodeGenOpts.hasSanitizeCoverage(); LangOpts.ForceEmitVTables = CodeGenOpts.ForceEmitVTables; LangOpts.SpeculativeLoadHardening = CodeGenOpts.SpeculativeLoadHardening; |