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
39 lines
852 B
C++
39 lines
852 B
C++
// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
|
|
|
|
|
|
// CHECK: _Z3fooRi(i32* inreg
|
|
void __attribute__ ((regparm (1))) foo(int &a) {
|
|
}
|
|
|
|
struct S1 {
|
|
int x;
|
|
S1(const S1 &y);
|
|
};
|
|
|
|
void __attribute__((regparm(3))) foo2(S1 a, int b);
|
|
// CHECK: declare void @_Z4foo22S1i(%struct.S1* inreg noundef, i32 inreg noundef)
|
|
void bar2(S1 a, int b) {
|
|
foo2(a, b);
|
|
}
|
|
|
|
struct S2 {
|
|
int x;
|
|
};
|
|
|
|
void __attribute__((regparm(3))) foo3(struct S2 a, int b);
|
|
// CHECK: declare void @_Z4foo32S2i(i32 inreg, i32 inreg noundef)
|
|
void bar3(struct S2 a, int b) {
|
|
foo3(a, b);
|
|
}
|
|
|
|
struct S3 {
|
|
struct {
|
|
struct {} b[0];
|
|
} a;
|
|
};
|
|
__attribute((regparm(2))) void foo4(S3 a, int b);
|
|
// CHECK: declare void @_Z4foo42S3i(%struct.S3* noundef byval(%struct.S3) align 4, i32 inreg noundef)
|
|
void bar3(S3 a, int b) {
|
|
foo4(a, b);
|
|
}
|