forked from OSchip/llvm-project
[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
This commit is contained in:
parent
f2c144fc18
commit
ab41a1c505
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
// RUN: %clang_cc1 -clear-ast-before-backend %s -emit-obj -o /dev/null -O1
|
||||
// RUN: %clang_cc1 -clear-ast-before-backend %s -emit-obj -o /dev/null -print-stats 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: *** Decl Stats:
|
||||
// CHECK: {{.*}} decls total
|
||||
// CHECK: 1 Function decls
|
||||
// CHECK: Total bytes =
|
||||
|
||||
void f() {}
|
||||
|
|
Loading…
Reference in New Issue