Revert "[clang] Pass -clear-ast-before-backend in Clang::ConstructJob()"

This reverts commit 47eb99aa44.

This causes crashes with -print-stats: PR52193.
This commit is contained in:
Arthur Eubanks 2021-10-16 12:05:41 -07:00
parent 492a4a428f
commit 49562d3dfe
2 changed files with 0 additions and 5 deletions

View File

@ -4660,7 +4660,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// cleanup.
if (!C.isForDiagnostics())
CmdArgs.push_back("-disable-free");
CmdArgs.push_back("-clear-ast-before-backend");
#ifdef NDEBUG
const bool IsAssertBuild = false;

View File

@ -113,10 +113,6 @@ CreateCI(const llvm::opt::ArgStringList &Argv) {
Clang->getTarget().adjust(Clang->getDiagnostics(), Clang->getLangOpts());
// Don't clear the AST before backend codegen since we do codegen multiple
// times, reusing the same AST.
Clang->getCodeGenOpts().ClearASTBeforeBackend = false;
return std::move(Clang);
}