[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 06:28:30 PDT 2020


Anastasia added inline comments.


================
Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12
+// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe at H$00 at __clang@@@Z"
+// UNMANGLED: define {{.*}}void @test1(
+}
----------------
erichkeane wrote:
> Anastasia wrote:
> > erichkeane wrote:
> > > Anastasia wrote:
> > > > Any reason to test unmangled?
> > > Because you asked to validate the OpenCL cases as well.
> > Ok, I guess we should add overloadable attribute otherwise it doesn't go through mangling? Then I guess you only need a check for Linux or Windows cases.
> Done, I wasn't able to remove OCLWINDOWS, since windows mangles attribute 'overloadable' in C only (and thus OpenCL).
Sorry what I meant is we should probably add overloadable attr to all functions so that we can check mangling in OpenCL C too. Then we won't need to check `UNMANGLED`. 

I am very confused of why right now you only do it in some cases but not all...


================
Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:20
+// Note: overloadable attribute makes OpenCL Linux still mangle this,
+// but we cannot overload on pipe still.
+// OCLLINUX: define void @_Z5test28ocl_pipe
----------------
Do you mean overload on pipe element type?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75685





More information about the cfe-commits mailing list