[PATCH] D50286: avoid creating conditional cleanup blocks that contain only @llvm.lifetime.end calls

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 18:21:38 PDT 2018

rsmith marked an inline comment as done.
rsmith added inline comments.

Comment at: lib/CodeGen/CGExpr.cpp:521
+          CGM.getCodeGenOpts().OptimizationLevel > 0 &&
+          !CGM.getCodeGenOpts().SanitizeAddressUseAfterScope) {
+        OldConditional = OutermostConditional;
rjmccall wrote:
> Why only when optimization is enabled?  This seems like a nice improvement regardless.
> Also, please mention why this is disabled for destructed types in the comment, not just the commit message.
The `OptimizationLevel` check is dead anyway (we don't emit lifetime markers unless we're optimizing or in use-after-scope mode). Removed.


More information about the cfe-commits mailing list