diff options
Diffstat (limited to 'clang/test/CodeGenCXX/rtti-linkage.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/rtti-linkage.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/rtti-linkage.cpp b/clang/test/CodeGenCXX/rtti-linkage.cpp index 451d3fb2704..22e859d69c9 100644 --- a/clang/test/CodeGenCXX/rtti-linkage.cpp +++ b/clang/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**); + +} + |