[PATCH] D19930: [Lifetime] Add lifetime markers for C++ lifetime-extended temporaries

Tim Shen via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 12:41:16 PDT 2016


timshen created this revision.
timshen added a reviewer: rsmith.
timshen added a subscriber: cfe-commits.

Use pushCleanupAfterFullExpr to add lifetime.end markers for 
lifetime-extended temporaries, similar to the way destructor calls get 
generated.

It does not change the AST representation. It doesn't generate normal temporary
lifetime markers, since normal temporaries appear in substantially different
places, which could be done in a separate patch.

http://reviews.llvm.org/D19930

Files:
  lib/CodeGen/CGCleanup.cpp
  lib/CodeGen/CGDecl.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/CodeGen/EHScopeStack.h
  test/CodeGen/lifetime-extended-temporaries.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19930.56187.patch
Type: text/x-patch
Size: 10256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160504/aa7cd213/attachment-0001.bin>


More information about the cfe-commits mailing list