Files
clang-p2996/clang/test/CodeGenCXX/mangle-ptr-size-address-space.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
867 B
C++

// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s --check-prefixes=CHECK
// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN
// CHECK-LABEL: define {{.*}}void @_Z2f0PU10ptr32_sptri
// WIN-LABEL: define {{.*}}void @"?f0@@YAXPAH@Z"
void f0(int * __ptr32 p) {}
// CHECK-LABEL: define {{.*}}i8 addrspace(271)* @_Z2f1PU10ptr32_sptri
// WIN-LABEL: define {{.*}}i8 addrspace(271)* @"?f1@@YAPAXPAH@Z"
void * __ptr32 __uptr f1(int * __ptr32 p) { return 0; }
// CHECK-LABEL: define {{.*}}void @_Z2f2Pi
// WIN-LABEL: define {{.*}}void @"?f2@@YAXPEAH@Z"
void f2(int * __ptr64 p) {}
// CHECK-LABEL: define {{.*}}i8* @_Z2f3Pi
// WIN-LABEL: define {{.*}}i8* @"?f3@@YAPEAXPEAH@Z"
void * __ptr64 f3(int * __ptr64 p) { return 0; }