summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 05:22:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 05:22:36 +0000
commit5d79a51a45ea9e4156acfd221e6bbe40b7ba2faa (patch)
tree6148c66415960561c61457c43eab0e4d5c182798 /clang/test/CodeGenCXX/ctor-dtor-alias.cpp
parentb4db43fad68c5c437075bcbf29d9ea5b5fc68f3a (diff)
downloadbcm5719-llvm-5d79a51a45ea9e4156acfd221e6bbe40b7ba2faa.tar.gz
bcm5719-llvm-5d79a51a45ea9e4156acfd221e6bbe40b7ba2faa.zip
Produce direct calls instead of alias to linkonce_odr functions.
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
Diffstat (limited to 'clang/test/CodeGenCXX/ctor-dtor-alias.cpp')
-rw-r--r--clang/test/CodeGenCXX/ctor-dtor-alias.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
index e658522d799..ff9bd7c5c5c 100644
--- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
+++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
@@ -13,12 +13,11 @@ template struct foobar<void>;
}
namespace test2 {
-// test that we produce an alias when the destrucor is linkonce_odr. Note that
-// the alias itself is weak_odr to make sure we don't get a translation unit
-// with just _ZN5test26foobarIvEC2Ev in it.
+// test that when the destrucor is linkonce_odr we just replace every use of
+// C1 with C2.
-// CHECK-DAG: @_ZN5test26foobarIvEC1Ev = alias weak_odr void (%"struct.test2::foobar"*)* @_ZN5test26foobarIvEC2Ev
// CHECK-DAG: define linkonce_odr void @_ZN5test26foobarIvEC2Ev(
+// CHECK-DAG: call void @_ZN5test26foobarIvEC2Ev
void g();
template <typename T> struct foobar {
foobar() { g(); }
@@ -48,9 +47,7 @@ namespace test4 {
// Test that we don't produce aliases from B to A. We cannot because we cannot
// guarantee that they will be present in every TU.
- // CHECK-DAG: @_ZN5test41BD1Ev = alias weak_odr void (%"struct.test4::B"*)* @_ZN5test41BD2Ev
// CHECK-DAG: define linkonce_odr void @_ZN5test41BD2Ev(
- // CHECK-DAG: @_ZN5test41AD1Ev = alias weak_odr void (%"struct.test4::A"*)* @_ZN5test41AD2Ev
// CHECK-DAG: define linkonce_odr void @_ZN5test41AD2Ev(
struct A {
virtual ~A() {}
OpenPOWER on IntegriCloud