summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/destructors.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark calls to 'throw()' functions as nounwind, and mark the functions nounwindJohn McCall2010-07-081-9/+6
| | | | | | as well. llvm-svn: 107858
* When destroying a cleanup, kill any references to instructions in the entryJohn McCall2010-07-061-0/+31
| | | | | | | | block before deleting it. Fixes PR7575. This really just a short-term fix before implementing lazy cleanups. llvm-svn: 107676
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Reinstate fix for PR7526, which was failing because, now that weDouglas Gregor2010-07-011-0/+19
| | | | | | | | | | | | | | | aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. llvm-svn: 107385
* Revert r107374, which broke bootstrap.Douglas Gregor2010-07-011-11/+0
| | | | llvm-svn: 107378
* When building the type of a destructor, make sure to keep theDouglas Gregor2010-07-011-0/+11
| | | | | | exception specification. Fixes PR7526. llvm-svn: 107374
* Give this test a triple.John McCall2010-05-271-1/+1
| | | | llvm-svn: 104798
* When deciding whether a deferred declaration has already been emitted,John McCall2010-05-271-1/+64
| | | | | | | aliases count as definitions regardless of whether their target has been emitted yet. Fixes PR 7142. llvm-svn: 104796
* Don't emit derived-to-base destructor aliases if we don't have a definitionJohn McCall2010-03-031-0/+14
| | | | | | | | for the base destructor, because aliases to declarations aren't legal. Fixes PR 6471. llvm-svn: 97637
* Perform two more constructor/destructor code-size optimizations:John McCall2010-02-231-1/+45
| | | | | | | | | | | | | | | | 1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin. 2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported). These are bundled together because I didn't think it worthwhile to split them, not because they really need to be. llvm-svn: 96842
* More refactoring around constructor/destructor code generation.John McCall2010-02-191-1/+48
| | | | | | | | | | | | Fix some bugs with function-try-blocks and simplify normal try-block code generation. This implementation excludes a deleting destructor's call to operator delete() from the function-try-block, which I believe is correct but which I can't find straightforward support for at a moment's glance. llvm-svn: 96670
* 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
* Unify the way destructor epilogues are generated for synthesized and regular ↵Anders Carlsson2009-11-171-0/+14
| | | | | | destructors. Also fix PR5529. llvm-svn: 89034
* CodeGen may see out-of-line declarations of the various special memberDouglas Gregor2009-10-011-1/+9
| | | | | | | | | | | functions when they are explicitly declared, e.g., via a function template specialization or explicit template instantiation declaration. Don't try to synthesize bodies for the special member functions in this case; rather, check whether we have an implicit declaration and, if so, synthesize the appropriate function body. Fixes PR5084. llvm-svn: 83212
* We can generate constructors/destructors with base classes and non-trivial ↵Anders Carlsson2009-09-011-0/+22
fields just fine now. llvm-svn: 80701
OpenPOWER on IntegriCloud