1 // RUN: %clang_cc1 -triple=x86_64-unknown-linux -emit-llvm %s -o - | FileCheck \
2 // RUN: -check-prefix=CHECK-1 %s
3 // RUN: %clang_cc1 -triple=x86_64-unknown-linux -emit-llvm %s -o - | FileCheck \
4 // RUN: -check-prefix=CHECK-2 %s
5 // RUN: %clang_cc1 -triple=x86_64-unknown-linux -emit-llvm %s -o - | FileCheck \
6 // RUN: -check-prefix=CHECK-3 %s
8 // CHECK-1: [[FOO:%.+]] = type { float }
13 template <typename T
> struct bar
: T
{
16 struct baz
: bar
<foo
> {
17 // CHECK-1: define{{.*}} float @_ZN3baz3getEv
18 // CHECK-1: {{%.+}} = getelementptr inbounds [[FOO]], ptr {{%.+}}, i32 0, i32 0
29 // CHECK-2: [[F:%.+]] = type { ptr }
34 template <typename j
> struct k
: j
{
35 // CHECK-2: define{{.*}} void @_ZN1kI1fE1lEv
36 // CHECK-2: {{%.+}} = getelementptr inbounds [[F]], ptr {{%.+}}, i32 0, i32 0
37 virtual void l(){ (void)f::g
; }
42 // CHECK-3: [[BASE:%.+]] = type { i32 }
48 template <typename Parent
>
49 struct Subclass
: public Parent
{
50 // CHECK-3: define{{.*}} i32 @_ZN8SubclassI4BaseE4funcEv
51 // CHECK-3: {{%.+}} = getelementptr inbounds [[BASE]], ptr {{%.+}}, i32 0, i32 0
52 int func() { return Base::member
; }
55 using Impl
= Subclass
<Base
>;