summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/ctor-dtor-alias.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 05:29:54 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 05:29:54 +0000
commit583f6de423aa42c8a4894cc64e72036484e6343b (patch)
treeb2aed581a5f4fa0be1646413b83c289154c8ba34 /test/CodeGenCXX/ctor-dtor-alias.cpp
parent0f0f6f1d2994b6da9c347ffb9740c4eea81ff6bc (diff)
Revert "Produce direct calls instead of alias to linkonce_odr functions."
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
Diffstat (limited to 'test/CodeGenCXX/ctor-dtor-alias.cpp')
-rw-r--r--test/CodeGenCXX/ctor-dtor-alias.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/CodeGenCXX/ctor-dtor-alias.cpp b/test/CodeGenCXX/ctor-dtor-alias.cpp
index ff9bd7c5c5..e658522d79 100644
--- a/test/CodeGenCXX/ctor-dtor-alias.cpp
+++ b/test/CodeGenCXX/ctor-dtor-alias.cpp
@@ -13,11 +13,12 @@ template struct foobar<void>;
}
namespace test2 {
-// test that when the destrucor is linkonce_odr we just replace every use of
-// C1 with C2.
+// 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.
+// 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(); }
@@ -47,7 +48,9 @@ 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() {}