summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCleanup.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert r234581, it might have caused a few miscompiles in Chromium."David Majnemer2015-04-221-1/+8
| | | | | | | | This reverts commit r234700. It turns out that the lifetime markers were not the cause of Chromium failing but a bug which was uncovered by optimizations exposed by the markers. llvm-svn: 235553
* Revert r234581, it might have caused a few miscompiles in Chromium.Nico Weber2015-04-111-8/+1
| | | | | | | If the revert helps, I'll get a repro this Monday. Else I'll put the change back in. llvm-svn: 234700
* Remove threshold for inserting lifetime markers for named temporariesArnaud A. de Grandmaison2015-04-101-1/+8
| | | | | | | | | | | | | | | | | | | Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. My previous commit (r222993) was not handling debuginfo correctly, but this could only be seen with some asan tests. Basically, lifetime markers are just instrumentation for the compiler's usage and should not affect debug information; however, the cleanup infrastructure was assuming it contained only destructors, i.e. actual code to be executed, and was setting the breakpoint for the end of the function to the closing '}', and not the return statement, in order to show some destructors have been called when leaving the function. This is wrong when the cleanups are only lifetime markers, and this is now fixed. llvm-svn: 234581
* Remove two unused methods. No behavior change.Nico Weber2015-02-221-2/+0
| | | | llvm-svn: 230152
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-1/+1
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie2014-11-191-2/+2
| | | | | | pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222335
* Replace a destructor of EHCleanupScope with a Destroy() method to reflect ↵Kostya Serebryany2014-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | the current usage. Summary: The current code uses memset to re-initialize EHCleanupScope objects with breaks the assumptions of the upcoming asan's intra-object-overflow checker. If there is no DTOR, the new checker will refuse to work. Test Plan: bootstrap with asan Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5656 llvm-svn: 219331
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* Update for llvm api change.Rafael Espindola2014-06-041-2/+2
| | | | llvm-svn: 210204
* [C++11] Use 'nullptr'. CodeGen edition.Craig Topper2014-05-211-5/+5
| | | | llvm-svn: 209272
* Fix leak in lib/CodeGen/CGException.cpp, PR18318Kostya Serebryany2014-01-091-0/+9
| | | | | | | | | | | | | | Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318 Reviewers: chandlerc, dblaikie Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2474 llvm-svn: 198857
* [CodeGen] Move EHScopeStack into its own headerReid Kleckner2013-06-191-462/+8
| | | | | | | CGCleanup.h isn't meant to be included by all of CodeGen according to John. llvm-svn: 184321
* Reapply r183721, reverted in r183776, with a fix for a bug in the former (weRichard Smith2013-06-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | were lacking ExprWithCleanups nodes in some cases where the new approach to lifetime extension needed them). Original commit message: Rework IR emission for lifetime-extended temporaries. Instead of trying to walk into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183859
* Revert r183721. It caused cleanups to be delayed too long in some cases.Richard Smith2013-06-111-5/+0
| | | | | | Testcase to follow. llvm-svn: 183776
* Rework IR emission for lifetime-extended temporaries. Instead of trying to walkRichard Smith2013-06-111-0/+5
| | | | | | | | | | | | | | | | | into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183721
* [CodeGen] Make CGCleanup.h include what it now usesReid Kleckner2013-06-091-6/+3
| | | | | | | Also move CGCleanup.h to the top of CGCleanup.cpp to verify that CGCleanup.h really includes what it needs. llvm-svn: 183632
* [CodeGen] Move EHScopeStack to CGCleanup.h from CodeGenFunction.hReid Kleckner2013-06-091-3/+457
| | | | | | | | | | No functionality change. CGCleanup.cpp provides the implementation for EHScopeStack, so it seems more consistent to place the class definition in CGCleanup.h. This should also help solve a header ordering problem that I have. llvm-svn: 183631
* Documentation cleanup:James Dennett2012-06-151-1/+1
| | | | | | | | * Escaped Objective-C @keywords in Doxygen comments; * Documented more accurate \params; * Exposed some more summaries using \brief. llvm-svn: 158559
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-111-171/+150
| | | | | | | | | | | | | | | hierarchy of delegation, and that EH selector values are meaningful function-wide (good thing, too, or inlining wouldn't work). 2,3d 1a hierarchy of delegation and that EH selector values have the same meaning everywhere in the function instead of being meaningful only in the context of a specific selector. This removes the need for routing edges through EH cleanups, since a cleanup simply always branches to its enclosing scope. llvm-svn: 137293
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-2/+2
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* Move all the cleanups framework code into a single file.John McCall2011-01-281-0/+560
Pure motion. llvm-svn: 124484
OpenPOWER on IntegriCloud