xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/vtable-align.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -triple=i386-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-32
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-64
3*0a6a1f1dSLionel Sambuc 
4*0a6a1f1dSLionel Sambuc struct A {
5*0a6a1f1dSLionel Sambuc   virtual void f();
6*0a6a1f1dSLionel Sambuc   virtual void g();
7*0a6a1f1dSLionel Sambuc   virtual void h();
8*0a6a1f1dSLionel Sambuc };
9*0a6a1f1dSLionel Sambuc 
f()10*0a6a1f1dSLionel Sambuc void A::f() {}
11*0a6a1f1dSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc // CHECK-32: @_ZTV1A = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1fEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1gEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1hEv to i8*)], align 4
13*0a6a1f1dSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc // CHECK-64: @_ZTV1A = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1fEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1gEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1hEv to i8*)], align 8
15