Files
clang-p2996/clang/test/CodeGenCXX/rtti-mingw64.cpp
Nikita Popov 532dc62b90 [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
2022-04-07 12:09:47 +02:00

19 lines
748 B
C++

// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu %s -emit-llvm -o - | FileCheck %s
struct A { int a; };
struct B : virtual A { int b; };
B b;
class C {
virtual ~C();
};
C::~C() {}
// CHECK: @_ZTI1C = linkonce_odr dso_local
// CHECK: @_ZTI1B = linkonce_odr dso_local constant { i8*, i8*, i32, i32, i8*, i64 }
// CHECK-SAME: i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*),
// CHECK-SAME: i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1B, i32 0, i32 0),
// CHECK-SAME: i32 0,
// CHECK-SAME: i32 1,
// CHECK-SAME: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*),
// This i64 is important, it should be an i64, not an i32.
// CHECK-SAME: i64 -6141 }, comdat