1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -cxx-abi microsoft -triple i686-pc-win32 -disable-llvm-optzns -emit-llvm -o - -O1 %s | FileCheck %s 2*f4a2713aSLionel Sambuc // 3*f4a2713aSLionel Sambuc // Test that TBAA works in the Microsoft C++ ABI. We used to error out while 4*f4a2713aSLionel Sambuc // attempting to mangle RTTI. 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc struct StructA { 7*f4a2713aSLionel Sambuc int a; 8*f4a2713aSLionel Sambuc }; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc struct StructB : virtual StructA { 11*f4a2713aSLionel Sambuc StructB(); 12*f4a2713aSLionel Sambuc }; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc StructB::StructB() { 15*f4a2713aSLionel Sambuc a = 42; 16*f4a2713aSLionel Sambuc // CHECK: store i32 42, i32* {{.*}}, !tbaa [[TAG_A_i32:!.*]] 17*f4a2713aSLionel Sambuc } 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc // CHECK: [[TYPE_CHAR:!.*]] = metadata !{metadata !"omnipotent char", metadata 20*f4a2713aSLionel Sambuc // CHECK: [[TYPE_INT:!.*]] = metadata !{metadata !"int", metadata [[TYPE_CHAR]], i64 0} 21*f4a2713aSLionel Sambuc // CHECK: [[TAG_A_i32]] = metadata !{metadata [[TYPE_A:!.*]], metadata [[TYPE_INT]], i64 0} 22*f4a2713aSLionel Sambuc // CHECK: [[TYPE_A]] = metadata !{metadata !"?AUStructA@@", metadata [[TYPE_INT]], i64 0} 23