// RUN: %clang_cc1 -emit-llvm -o - -O1 %s | FileCheck %s
// Check that we generate TBAA for vtable pointer loads and stores.
struct A {
  virtual int foo() const ;
  virtual ~A();
};

void CreateA() {
  new A;
}

void CallFoo(A *a) {
  a->foo();
}

// CHECK: %vtable = load {{.*}} !tbaa !0
// CHECK: store {{.*}} !tbaa !0
// CHECK: !0 = metadata !{metadata !"vtable pointer", metadata !1}
// CHECK: !1 = metadata !{metadata !"Simple C/C++ TBAA", null}

// RUN: %clang_cc1 -emit-llvm -o - -O1 %s | FileCheck %s
// Check that we generate TBAA for vtable pointer loads and stores.
struct A {
  virtual int foo() const ;
  virtual ~A();
};

void CreateA() {
  new A;
}

void CallFoo(A *a) {
  a->foo();
}

// CHECK: %{{.*}} = load {{.*}} !tbaa !0
// CHECK: store {{.*}} !tbaa !0
// CHECK: !0 = metadata !{metadata !"vtable pointer", metadata !1}
// CHECK: !1 = metadata !{metadata !"Simple C/C++ TBAA", null}

Fix test failure in release mode.
[tests] Fix test failure in release mode.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@153460 91177308-0d34-0410-b5e6-96231b3b80d8
