diff options
author | Matthias Gehre <M.Gehre@gmx.de> | 2015-11-14 00:36:50 +0000 |
---|---|---|
committer | Matthias Gehre <M.Gehre@gmx.de> | 2015-11-14 00:36:50 +0000 |
commit | 09a134eca3960d16325090631428b3dbc535ce4b (patch) | |
tree | 2a6cd0c8ee3115290514de7b496265203ed247fa /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 6d048942c563dff83fb743ccf16959fe8e240d11 (diff) | |
download | llvm-09a134eca3960d16325090631428b3dbc535ce4b.zip llvm-09a134eca3960d16325090631428b3dbc535ce4b.tar.gz llvm-09a134eca3960d16325090631428b3dbc535ce4b.tar.bz2 |
CFG: Delay creating Dtors for CompoundStmts which end in ReturnStmt
Summary:
VisitReturnStmt would create a new block with including Dtors, so the Dtors created
in VisitCompoundStmts would be in an unreachable block.
Example:
struct S {
~S();
};
void f()
{
S s;
return;
}
void g()
{
S s;
}
Before this patch, f has one additional unreachable block containing just the
destructor of S. With this patch, both f and g have the same blocks.
Reviewers: krememek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13973
llvm-svn: 253107
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions