Files
clang-p2996/clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl
Anastasia Stulova 6b1a04529c [OpenCL][SPIR-V] Test extern functions with a pointer arg.
Added a test case that enhances coverage of opaque pointers
particularly for the problematic case with extern functions
for which there is no solution found for type recovery.

Differential Revision: https://reviews.llvm.org/D130768
2022-09-01 10:22:47 +01:00

11 lines
372 B
Common Lisp

// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple spirv64 %s | FileCheck %s
// Check that we have a way to recover pointer
// types for extern function prototypes (see PR56660).
extern void foo(global int * ptr);
kernel void k(global int * ptr) {
foo(ptr);
}
//CHECK: define spir_kernel void @k(i32 {{.*}}*
//CHECK: declare spir_func void @foo(i32 {{.*}}*