[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 07:35:56 PDT 2020
erichkeane marked an inline comment as done.
erichkeane added inline comments.
================
Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956
+
+ mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"});
}
----------------
erichkeane wrote:
> Anastasia wrote:
> > 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?
> I don't know those well enough to answer, but at least in this case 'Pipe' isn't a Type. It is a Type Class. Because of this, having a single mangling for it is incorrect. It appears images likely is going to have this problem as well.
I've looked closer, and I don't believe this is a problem for other openCL types (other than they are not reserved names). In ~2090 in this file those are implemented as a struct named ocl_*, which while not reserved in C++ will demangle. Image types are mangled differently, also as a struct type, so i think those are OK.
These pipe types aren't mangled separately in Linux (hence why overloading doesn't work with them in Linux).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75685/new/
https://reviews.llvm.org/D75685
More information about the cfe-commits
mailing list