summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [opaque pointer type] update test cases for explicit pointee types on global ↵David Blaikie2015-09-111-1/+1
| | | | | | aliases llvm-svn: 247380
* Changed renaming of local symbols by inserting a dot vefore the numeric suffixSunil Srivastava2015-05-121-6/+6
| | | | | | | details in http://reviews.llvm.org/D9483 goes with llvm checkin r237150 llvm-svn: 237151
* [pr22293] Don't crash during codegen of a recursive destructor.Rafael Espindola2015-01-231-0/+11
| | | | | | | | | | | In ItaniumCXXABI::EmitCXXDestructors we first emit the base destructor and then try to emit the complete one as an alias. If in the base ends up calling the complete destructor, the GD for the complete will be in the list of deferred decl by the time we replace it with an alias and delete the original GV. llvm-svn: 226896
* Use a trivial comdat for inline ctor/dtor when not using C5/D5.Rafael Espindola2015-01-151-5/+8
| | | | | | | When combined with llvm not producing implicit comdats, not doing this would cause code bloat on ELF and link errors on COFF. llvm-svn: 226211
* Update for .ll syntax change.Rafael Espindola2015-01-061-4/+4
| | | | llvm-svn: 225303
* Don't try to use C5/D5 comdats in COFF.Rafael Espindola2014-09-161-0/+5
| | | | | | This should fix the mingw bootstrap. llvm-svn: 217897
* Add support for putting constructors and destructos in explicit comdats.Rafael Espindola2014-09-161-9/+49
| | | | | | | | | | | | | | | | | | There are situations when clang knows that the C1 and C2 constructors or the D1 and D2 destructors are identical. We already optimize some of these cases, but cannot optimize it when the GlobalValue is weak_odr. The problem with weak_odr is that an old TU seeing the same code will have a C1 and a C2 comdat with the corresponding symbols. We cannot suddenly start putting the C2 symbol in the C1 comdat as we cannot guarantee that the linker will not pick a .o with only C1 in it. The solution implemented by GCC is to expand the ABI to have a comdat whose name uses a C5/D5 suffix and always has both symbols. That is what this patch implements. llvm-svn: 217874
* Cleanup test.Rafael Espindola2014-08-301-21/+31
| | | | | | This should make it easier to add more tests to this file. llvm-svn: 216807
* Update for llvm API change.Rafael Espindola2014-06-031-1/+1
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Update for llvm api change.Rafael Espindola2014-05-161-1/+1
| | | | | | | | | | Now that llvm cannot represent alias cycles, we have to diagnose erros just before trying to close the cycle. This degrades the errors a bit. The real solution is what it was before: if we want to provide good errors for these cases, we have to be able to find a clang level decl given a mangled name and produce the error from Sema. llvm-svn: 209008
* Don't produce an alias between destructors with different calling conventions.Rafael Espindola2014-03-051-2/+18
| | | | | | Fixes pr19007. llvm-svn: 203007
* Fix broken CHECK linesNico Rieck2014-02-161-1/+1
| | | | llvm-svn: 201477
* Remove duplicated -cc1 in testsAlp Toker2013-12-081-1/+1
| | | | llvm-svn: 196728
* Adjust r194296 to not apply the alias replacement for externallyJoerg Sonnenberger2013-11-221-0/+32
| | | | | | | | available always-inline functions. This breaks libc++'s locale implementation. Code generation for this case should be fixed, but this is a stop gap fix for clang 3.4. llvm-svn: 195501
* Don't use alias from derived dtor to base dtor at -O0.Rafael Espindola2013-11-131-1/+7
| | | | | | | | | | This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0. This optimization can have a negative impact on the debug quality. This was a latent bug for some time with local classes, but got noticed when it was generalized and broke gdb's destrprint.exp. llvm-svn: 194618
* Avoid producing mismatched comdats.Rafael Espindola2013-11-121-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The problem was that given template<typename T> struct foo { ~foo() {} }; template class foo<int>; We would produce a alias, creating a comdat with D0 and D1, since the symbols have to be weak. Another TU is not required to have a explicit template instantiation definition or an explict template instantiation declaration and for template<typename T> struct foo { ~foo() {} }; foo<int> a; we would produce a comdat with only one symbol in it. llvm-svn: 194520
* Add a testcase where we replace a destructor with an alias.Rafael Espindola2013-11-111-0/+16
| | | | | | This is a reduced testcase from a cast to Function failing during bootstrap. llvm-svn: 194430
* Fix pr17875.Rafael Espindola2013-11-111-0/+15
| | | | | | | | The assert this patch deletes was valid only when aliasing D2 to D1, not when looking at a base class. Since the assert was in the path where we had already decided to not produce an alias, just drop it. llvm-svn: 194411
* Don't emit an internal destructor that is identical to an external one.Rafael Espindola2013-11-091-0/+15
| | | | | | | It is not safe to emit alias to undefined (not supported by ELF or COFF), but it is safe to rauw when the alias would have been internal or linkonce_odr. llvm-svn: 194307
* Use rauw for all discardable aliases, not just linkonce_odr.Rafael Espindola2013-11-081-4/+19
| | | | llvm-svn: 194296
* If a linkonce_odr dtor/ctor is identical to another one, just rauw.Rafael Espindola2013-11-081-2/+3
| | | | | | | Unlike an alias a rauw is always safe, so we don't need to avoid this optimization when the replacement is not know to be available in every TU. llvm-svn: 194288
* Produce direct calls instead of alias to linkonce_odr functions.Rafael Espindola2013-11-051-6/+3
| | | | | | | This is a small optimization on linux, but should help more on windows where msvc only outputs one destructor if there would be two identical ones. llvm-svn: 194095
* Revert "Produce direct calls instead of alias to linkonce_odr functions."Rafael Espindola2013-11-051-3/+6
| | | | | | | This reverts commit r194046. Debugging a bootstrap issue. llvm-svn: 194047
* Produce direct calls instead of alias to linkonce_odr functions.Rafael Espindola2013-11-051-6/+3
| | | | | | | This is a small optimization on linux, but should help more on windows where msvc only outputs one destructor if there would be two identical ones. llvm-svn: 194046
* Use aliases for more constructors and destructors.Rafael Espindola2013-11-041-0/+62
With this patch we produce alias for cases like template<typename T> struct foobar { foobar() { } }; template struct foobar<void>; We just have to be careful to produce the same aliases in every TU because of comdats. llvm-svn: 194000
OpenPOWER on IntegriCloud