[cfe-commits] [PATCH] [VCPP] Add __ptr64 qualifier

Aaron Ballman aaron at aaronballman.com
Mon Nov 12 15:31:29 PST 2012


I would break the problem into several smaller parts.  For right now,
I'd ignore __ptr64 and __ptr32 entirely and focus solely on what it
takes to get Microsoft mangling of pointers correct for x86-64 builds.
 I would focus on function parameters (public, protected, private and
non-instance), and then return types first.  Then I'd focus on global
variables.  I would make a small example app using all of these
constructs and see how MSVC handles mangling them and compare that to
what clang currently emits.  That should give you a good start on what
items need to be tackled -- make a test case for each item that needs
to be handled (knowing they'll fail), and then work on the code until
it succeeds.

Once we've gotten pointer mangling correct, we can start to worry
about type attributes like __ptr64 and __ptr32.

~Aaron

On Mon, Nov 12, 2012 at 3:15 PM, pravic <ehysta at gmail.com> wrote:
>
>   Another problem.
>
>   For example,
>
>
>     void* __ptr32 pub( int * p)
>
>
>
>   Here we have the one explicit attribute, but MicrosoftCXXNameMangler::mangleType operates by **QualType**, which have no attributes, only qualifiers.
>
>   The **NamedDecl** have them, but where is connection between some attribute in //declaration// and specific type? Attribute also have a source location, but **QualType** no.
>
> http://llvm-reviews.chandlerc.com/D101
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list