summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/eh.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Throw the switch to convert clang to the new exception handling model!Bill Wendling2011-09-191-6/+11
| | | | | | | | | | | | | This model uses the 'landingpad' instruction, which is pinned to the top of the landing pad. (A landing pad is defined as the destination of the unwind branch of an invoke instruction.) All of the information needed to generate the correct exception handling metadata during code generation is encoded into the landingpad instruction. The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic call. It's lowered in much the same way as the intrinsic is. llvm-svn: 140049
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-111-15/+15
| | | | | | | | | | | | | | | 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
* Be sure to destroy the normal entry block of a cleanup that weJohn McCall2011-08-061-4/+1
| | | | | | | | | | | | | | | aren't actually going to make a normal cleanup for. Sometimes we optimistically create branches to such blocks for fixups, and then we resolve the fixup to somewhere within the cleanup's scope, and then the cleanup is actually not reachable for some reason. The process of resolving the fixup leaves us with switches whose default edge leads to the cleanup; we can replace that with unreachable, then (in many cases) turn the switch into an unconditional branch. Fixes PR10467. llvm-svn: 137011
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-7/+7
| | | | llvm-svn: 134831
* Convert Clang over to resuming from landing pads with llvm.eh.resume.John McCall2011-05-281-4/+10
| | | | | | It's quite likely that this will explode, but I need to know how. :) llvm-svn: 132269
* Back out r132209; it's breaking nightly tests.Eli Friedman2011-05-271-1/+1
| | | | llvm-svn: 132219
* Implement a new, much improved version of the cleanup hack. We just needJohn McCall2011-05-271-1/+1
| | | | | | | | to be careful to emit landing pads that are always prepared to handle a cleanup path. This is correct mostly because of the fix to the LLVM inliner, r132200. llvm-svn: 132209
* Reapply r121528, fixing PR9941 by delaying the exception specification check ↵Sebastian Redl2011-05-191-4/+4
| | | | | | for destructors until the class is complete and destructors have been adjusted. llvm-svn: 131632
* Revert r121528 as it breaks a simple testcase, which leads to, amongAlexis Hunt2011-05-181-4/+4
| | | | | | other things, libcxx not building. llvm-svn: 131573
* Implement implicit exception specifications of destructors.Sebastian Redl2011-05-181-4/+4
| | | | llvm-svn: 131528
* Add -fcxx-exceptions to all tests that use C++ exceptions.Anders Carlsson2011-02-281-1/+1
| | | | llvm-svn: 126599
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-281-31/+53
| | | | | | | | | fixing a crash which probably nobody was ever going to see. In doing so, fix a horrendous number of problems with the conditional-cleanups code. Also, make conditional cleanups re-use the cleanup's activation variable, which avoids some unfortunate repetitiveness. llvm-svn: 124481
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-2/+2
| | | | llvm-svn: 124210
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-111-2/+2
| | | | llvm-svn: 123197
* When creating a jump destination, its scope should be the scope of theJohn McCall2010-07-281-0/+35
| | | | | | | | | enclosing normal cleanup, not the top of the EH stack. I'm *really* surprised this hasn't been causing more problems. Fixes rdar://problem/8231514. llvm-svn: 109569
* Test for the presence of EH branch-throughs instead of normal branch-throughs.John McCall2010-07-261-0/+18
| | | | | | I knew this code duplication would bite me. llvm-svn: 109463
* Revise cleanup IR generation to fix a major bug with cleanups (PR7686)John McCall2010-07-231-0/+71
| | | | | | | as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups. llvm-svn: 109274
* Fix the IR generation for catching pointers by references.John McCall2010-07-201-0/+41
| | | | | | Fixes <rdar://problem/8212123>. llvm-svn: 108944
* Allow for the possibility that __cxa_end_catch might throw for a catch-all blockJohn McCall2010-07-131-4/+36
| | | | | | | or a catch of a record type by value or reference. Also convert this to a lazy cleanup. llvm-svn: 108287
* Switch the __cxa_free_exception cleanup to be lazy.John McCall2010-07-131-3/+0
| | | | llvm-svn: 108276
* Teach function-try-blocks on constructors and destructors to implicitlyJohn McCall2010-07-071-0/+27
| | | | | | rethrow. Fixes rdar://problem/7696603 llvm-svn: 107757
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Neuter this testcase a little. The way LLVM writes labels for anonymous blocksJohn McCall2010-04-221-3/+3
| | | | | | makes it impossible to check labels. llvm-svn: 102048
* Call PerformCopyInitialization to properly initialize the exception temporaryJohn McCall2010-04-221-26/+61
| | | | | | | | | in a throw expression. Use EmitAnyExprToMem to emit the throw expression, which magically elides the final copy-constructor call (which raises a new strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer if the exception type has a non-trivial destructor. llvm-svn: 102039
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-041-1/+1
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-021-1/+1
| | | | llvm-svn: 100200
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-021-1/+1
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-301-1/+1
| | | | llvm-svn: 99949
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-1/+1
| | | | | | memmove, and memset llvm-svn: 99930
* Fix Release-Asserts.Mike Stump2010-01-131-25/+21
| | | | llvm-svn: 93353
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* When an exception needs to be freed by calling __cxa_exception_free, make ↵Anders Carlsson2009-12-111-0/+6
| | | | | | | | sure to stash away the exception pointer somewhere. This fixes an "Instruction does not dominate all uses!" verification error when compiling TableGen. llvm-svn: 91084
* Add terminate handler for copy constructors for thrown objects. WIP.Mike Stump2009-12-091-2/+3
| | | | llvm-svn: 90994
* Add testcases for recent checkins.Mike Stump2009-11-201-0/+68
llvm-svn: 89469
OpenPOWER on IntegriCloud