[cfe-commits] r107264 - in /cfe/trunk: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/mangle-ms.cpp
John McCall
rjmccall at apple.com
Wed Jun 30 13:58:07 PDT 2010
On Jun 30, 2010, at 1:44 PM, Charles Davis wrote:
> On 6/30/10 2:10 PM, John McCall wrote:
>>
>> On Jun 30, 2010, at 1:05 PM, Charles Davis wrote:
>>> The "proper" way IMO is to store it in the FunctionType's argument list as an IncompleteArrayType and have canonicalization of the function type decay it to a pointer. Then the mangler will detect that it's mangling a parameter array and mangle it as a const pointer. At least, there really should be some way of detecting that a parameter was declared as an array instead of a pointer.
>>
>> The type-as-written for the parameter declaration remembers this.
> How do you get that from a FunctionType? As far as I know, you need a
> FunctionDecl to get the ParmVarDecls. We don't always have
> one--particularly when we're mangling pointers to functions (which I
> haven't really looked at yet).
Right, which was why I asked about it.
Does MSVC mangle any other kind of "sugar" differently? Do all the following
have the same mangling?
typedef int Int;
typedef int IntArray[10];
void foo(int x[10]);
void foo(Int x[10]);
void foo(IntArray x);
Because it sounds like you're stuck mangling the types-as-written, which really sucks, so I'm curious if there's anything else forcing you down this path.
John.
More information about the cfe-commits
mailing list