On Tue, Oct 15, 2013 at 12:58 PM, Rafael Espíndola <
[email protected]> wrote:
> > shouldMangleDeclNameImpl can be shouldMangleCXXName, following the same
> > logic as mangleName.
>
> Done.
>
> > This AttributedType handling isn't necessary, use
> T->castAs<FunctionType>()
> > instead of cast<>() to look through the type sugar.
>
> This is awesome. Done.
>
> > + return mangleCXXName(D, Out);
> >
> > We shouldn't apply the stdcall or fastcall manglings to C++ symbols. You
> > should check if we should mangle this as a C++ name first, and after that
> > see if we need to apply C manglings.
>
> Thanks. I noticed that we were not quoting the mingw case. I have
> fixed the logic and added a c++ testcase.
>
Almost right. Don't try to mangle non-extern C C++ symbols, as in things
that return true for shouldMangleCXXName(). This test case gives the
symbol ?foo@Foo@@QAGXXZ, which demangles to (public: void __stdcall
Foo::foo(void)), which already includes the calling convention anyway.
struct Foo {
void __stdcall foo();
};
void Foo::foo() {}
Feel free to commit with that fixed.
At this point it's not clear to me that you need the StdOrFastCC enum
anymore, but I don't feel strongly.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits