This patch fixes a bug introduced in commit 4eaf5846d0e7. Commit 4eaf5846d0e7 sets address space of function type as program address space unconditionally. This breaks types which have address space qualifiers. E.g. __ptr32. This patch fixes the bug by using address space qualifiers if present. Differential Revision: https://reviews.llvm.org/D119045
11 lines
272 B
C
11 lines
272 B
C
// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
|
|
int foo(void) {
|
|
int (*__ptr32 a)(int);
|
|
return sizeof(a);
|
|
}
|
|
|
|
// CHECK: define dso_local i32 @foo
|
|
// CHECK: %a = alloca i32 (i32) addrspace(270)*, align 4
|
|
// CHECK: ret i32 4
|