[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-14 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd0a5f61c4f6f: [clang] Support -clear-ast-before-backend without -disable-free (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 379827. aeubanks added a comment. add more comments about the cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111767/new/ https://reviews.llvm.org/D111767 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added subscribers: aaron.ballman, rsmith. dblaikie added a comment. This revision is now accepted and ready to land. Sounds OK, thanks! Comment at: clang/lib/CodeGen/CodeGenAction.cpp:355-356 + if (CodeGenOpts.ClearASTBeforeBackend

[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:355-356 + if (CodeGenOpts.ClearASTBeforeBackend) { +// The ASTContext may be unusable after this. +C.cleanup(); C.getAllocator().Reset(); dblaikie wrote:

[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:355-356 + if (CodeGenOpts.ClearASTBeforeBackend) { +// The ASTContext may be unusable after this. +C.cleanup(); C.getAllocator().Reset(); Any chance of r

[PATCH] D111767: [clang] Support -clear-ast-before-backend without -disable-free

2021-10-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: dblaikie. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously without -disable-free, -clear-ast-before-backend would crash in ~ASTContext() due to various reasons.