[PATCH] D111270: [clang] Pass -clear-ast-before-backend in Clang::ConstructJob()
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 15 10:19:03 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG47eb99aa44ab: [clang] Pass -clear-ast-before-backend in Clang::ConstructJob() (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111270/new/
https://reviews.llvm.org/D111270
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Interpreter/Interpreter.cpp
Index: clang/lib/Interpreter/Interpreter.cpp
===================================================================
--- clang/lib/Interpreter/Interpreter.cpp
+++ clang/lib/Interpreter/Interpreter.cpp
@@ -113,6 +113,10 @@
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);
}
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -4660,6 +4660,7 @@
// cleanup.
if (!C.isForDiagnostics())
CmdArgs.push_back("-disable-free");
+ CmdArgs.push_back("-clear-ast-before-backend");
#ifdef NDEBUG
const bool IsAssertBuild = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111270.380052.patch
Type: text/x-patch
Size: 915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211015/0db2af40/attachment.bin>
More information about the cfe-commits
mailing list