[PATCH] D130768: [OpenCL][SPIR-V] Add test for extern functions with a pointer

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 02:23:32 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6b1a04529c8f: [OpenCL][SPIR-V] Test extern functions with a pointer arg. (authored by Anastasia).
Herald added a subscriber: ldrumm.
Herald added a project: clang.

Changed prior to commit:
  https://reviews.llvm.org/D130768?vs=448602&id=457208#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130768/new/

https://reviews.llvm.org/D130768

Files:
  clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl


Index: clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl
===================================================================
--- /dev/null
+++ clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl
@@ -0,0 +1,10 @@
+// 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 {{.*}}*


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130768.457208.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220901/4d2e4fa3/attachment-0001.bin>


More information about the cfe-commits mailing list