summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Emit lifetime.ends in both EH and non-EH blocksGeorge Burgess IV2018-03-081-0/+189
Before this, we'd only emit lifetime.ends for these temps in non-exceptional paths. This potentially made our stack larger than it needed to be for any code that follows an EH cleanup. e.g. in ``` struct Foo { char cs[32]; }; void escape(void *); struct Bar { ~Bar() { char cs[64]; escape(cs); } }; Foo getFoo(); void baz() { Bar b; getFoo(); } ``` baz() would require 96 bytes of stack, since the temporary from getFoo() only had a lifetime.end on the non-exceptional path. This also makes us keep hold of the Value* returned by EmitLifetimeStart, so we don't have to remake it later. llvm-svn: 326988
OpenPOWER on IntegriCloud