With all MaterializeTemporaryExprs coming with a ExprWithCleanups, it's
easy to add correct lifetime.end marks into the right RunCleanupsScope.
Details
- Reviewers
rsmith - Commits
- rG53547d95ca31: Removes CHECKs for symbolic label names (as Debug Clang will generate).
rG421119fd891c: [Temporary, Lifetime] Add lifetime marks for temporaries
rC274396: Removes CHECKs for symbolic label names (as Debug Clang will generate).
rC274385: [Temporary, Lifetime] Add lifetime marks for temporaries
rL274396: Removes CHECKs for symbolic label names (as Debug Clang will generate).
rL274385: [Temporary, Lifetime] Add lifetime marks for temporaries
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/CGExpr.cpp | ||
---|---|---|
446 ↗ | (On Diff #58011) | This should use pushFullExprCleanup. |
Used pushFullExprCleanup.
microsoft-abi-eh-cleanups.cpp fails because each pushFullExprCleanup introduces a new cleanup.cond variable, even if that pushFullExprCleanup is just for lifetime marks. With LLVM optimizations turned on (e.g. -O1), these cleanup.conds get eliminated; -O0 doesn't generate lifetime marks. So there is no practical affect unless "-disable-llvm-optzns -O3" -- as the test does -- are passed together.
lib/CodeGen/CGExpr.cpp | ||
---|---|---|
438 ↗ | (On Diff #58738) | Seems like you should push the cleanup before you emit the initializer; the cleanup should run if the initializer throws. |
Also committed r274387 to remove unnecessary CHECks. It seems to cause problems in certain platforms.
...and r274396 to remove all of the checks for symbolic labels, which are not generated by release builds, nor controlled by a runtime-flag.