summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/ctor-dtor-alias.cpp
Commit message (Collapse)AuthorAge
* Update for llvm API change.Rafael Espindola2014-06-03
| | | | | | Aliases in llvm now hold an arbitrary expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210063 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm api change.Rafael Espindola2014-05-16
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209008 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't produce an alias between destructors with different calling conventions.Rafael Espindola2014-03-05
| | | | | | Fixes pr19007. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203007 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken CHECK linesNico Rieck2014-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201477 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplicated -cc1 in testsAlp Toker2013-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196728 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust r194296 to not apply the alias replacement for externallyJoerg Sonnenberger2013-11-22
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195501 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use alias from derived dtor to base dtor at -O0.Rafael Espindola2013-11-13
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194618 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid producing mismatched comdats.Rafael Espindola2013-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194520 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase where we replace a destructor with an alias.Rafael Espindola2013-11-11
| | | | | | This is a reduced testcase from a cast to Function failing during bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194430 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr17875.Rafael Espindola2013-11-11
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194411 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit an internal destructor that is identical to an external one.Rafael Espindola2013-11-09
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194307 91177308-0d34-0410-b5e6-96231b3b80d8
* Use rauw for all discardable aliases, not just linkonce_odr.Rafael Espindola2013-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194296 91177308-0d34-0410-b5e6-96231b3b80d8
* If a linkonce_odr dtor/ctor is identical to another one, just rauw.Rafael Espindola2013-11-08
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194288 91177308-0d34-0410-b5e6-96231b3b80d8
* Produce direct calls instead of alias to linkonce_odr functions.Rafael Espindola2013-11-05
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194095 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Produce direct calls instead of alias to linkonce_odr functions."Rafael Espindola2013-11-05
| | | | | | | This reverts commit r194046. Debugging a bootstrap issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194047 91177308-0d34-0410-b5e6-96231b3b80d8
* Produce direct calls instead of alias to linkonce_odr functions.Rafael Espindola2013-11-05
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194046 91177308-0d34-0410-b5e6-96231b3b80d8
* Use aliases for more constructors and destructors.Rafael Espindola2013-11-04
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194000 91177308-0d34-0410-b5e6-96231b3b80d8