diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-20 22:30:54 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-20 22:30:54 +0000 |
commit | 8d1451535524cb21a6f8347bad9fed371b9d9ecb (patch) | |
tree | 91006dbcbff3e0b5ff310d81069d718226294050 /test/CodeGenCXX/rtti-linkage.cpp | |
parent | dd4e485a0db4e651f28281cd3eda93aad6ee04fd (diff) |
Rework the way pointer types are handled by the RTTI builder. We now get the right linkage for indirect pointers to incomplete structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/rtti-linkage.cpp')
-rw-r--r-- | test/CodeGenCXX/rtti-linkage.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp index 451d3fb270..22e859d69c 100644 --- a/test/CodeGenCXX/rtti-linkage.cpp +++ b/test/CodeGenCXX/rtti-linkage.cpp @@ -1,10 +1,14 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +#include <typeinfo> // CHECK: _ZTS1B = constant // CHECK: _ZTS1A = weak_odr constant // CHECK: _ZTI1A = weak_odr constant // CHECK: _ZTI1B = constant - +// CHECK: _ZTSP1C = internal constant +// CHECK: _ZTIP1C = internal constant +// CHECK: _ZTSPP1C = internal constant +// CHECK: _ZTIPP1C = internal constant // A has no key function, so its RTTI data should be weak_odr. struct A { }; @@ -14,3 +18,14 @@ struct B : A { virtual void f(); }; void B::f() { } + +// C is an incomplete class type, so any direct or indirect pointer types should have +// internal linkage, as should the type info for C itself (FIXME). +struct C; + +void f() { + (void)typeid(C*); + (void)typeid(C**); + +} + |