2019-12-19 05:15:13 +08:00
|
|
|
// RUN: %clang_cc1 -fms-extensions -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s --check-prefixes=CHECK
|
Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr.
Summary:
This adds parsing of the qualifiers __ptr32, __ptr64, __sptr, and __uptr and
lowers them to the corresponding address space pointer for 32-bit and 64-bit pointers.
(32/64-bit pointers added in https://reviews.llvm.org/D69639)
A large part of this patch is making these pointers ignore the address space
when doing things like overloading and casting.
https://bugs.llvm.org/show_bug.cgi?id=42359
Reviewers: rnk, rsmith
Subscribers: jholewinski, jvesely, nhaehnle, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71039
2019-10-25 07:34:25 +08:00
|
|
|
// RUN: %clang_cc1 -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) {}
|
|
|
|
|
2019-12-19 05:15:13 +08:00
|
|
|
// CHECK-LABEL: define {{.*}}i8* @_Z2f3Pi
|
Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr.
Summary:
This adds parsing of the qualifiers __ptr32, __ptr64, __sptr, and __uptr and
lowers them to the corresponding address space pointer for 32-bit and 64-bit pointers.
(32/64-bit pointers added in https://reviews.llvm.org/D69639)
A large part of this patch is making these pointers ignore the address space
when doing things like overloading and casting.
https://bugs.llvm.org/show_bug.cgi?id=42359
Reviewers: rnk, rsmith
Subscribers: jholewinski, jvesely, nhaehnle, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71039
2019-10-25 07:34:25 +08:00
|
|
|
// WIN-LABEL: define {{.*}}i8* @"?f3@@YAPEAXPEAH@Z"
|
|
|
|
void * __ptr64 f3(int * __ptr64 p) { return 0; }
|