[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 12 07:03:14 PDT 2020
Anastasia added inline comments.
================
Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956
+
+ mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"});
}
----------------
erichkeane wrote:
> Anastasia wrote:
> > We don't seem to add namespace for other OpenCL types, although I am not against it as I find it actually cleaner.
> >
> > Since the mangling deviates what is documented can you add some comments here explaining your mangling scheme?
> The Microsoft mangling scheme is owned by the Microsoft Corporation, so adding something to their mangling (like 8ocl_pipe) isn't permitted. Thus, the clang project mangles our types that aren't supported by Microsoft as a type in the __clang namespace.
>
> You'll note that we do it for a bunch of types above, including AddressSpaceType, VectorType, _Complex, _Float16, _Half, etc.
Are you saying that we have a bug for the other OpenCL type i.e. images, samplers, etc?
================
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(
+}
----------------
Any reason to test unmangled?
================
Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:25
+
+#ifdef WIN
+// SPIR Spec specifies mangling on pipes that doesn't include the element type
----------------
I am still unclear why is this special case?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75685/new/
https://reviews.llvm.org/D75685
More information about the cfe-commits
mailing list