diff options
Diffstat (limited to 'clang/test/CodeGenCXX/ctor-dtor-alias.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/ctor-dtor-alias.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp index ef56564d3dd..266eecc8093 100644 --- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp +++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp @@ -1,10 +1,14 @@ // RUN: %clang_cc1 %s -triple x86_64-linux -emit-llvm -o - -mconstructor-aliases | FileCheck %s namespace test1 { -// test that we produce an alias when the destructor is weak_odr +// test that we don't produce an alias when the destructor is weak_odr. The +// reason to avoid it that another TU might have no explicit template +// instantiation definition or declaration, causing it to to output only +// one of the destructors as linkonce_odr, producing a different comdat. + +// CHECK-DAG: define weak_odr void @_ZN5test16foobarIvEC2Ev +// CHECK-DAG: define weak_odr void @_ZN5test16foobarIvEC1Ev -// CHECK-DAG: @_ZN5test16foobarIvEC1Ev = alias weak_odr void (%"struct.test1::foobar"*)* @_ZN5test16foobarIvEC2Ev -// CHECK-DAG: define weak_odr void @_ZN5test16foobarIvEC2Ev( template <typename T> struct foobar { foobar() {} }; |