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