[cfe-dev] Getting the intptr_t type.

Enea Zaffanella zaffanella at cs.unipr.it
Sat Jan 26 02:07:47 PST 2013


On 01/25/2013 11:10 PM, Jordan Rose wrote:
>
> On Jan 25, 2013, at 12:17 , Matthieu Monrocq <matthieu.monrocq at gmail.com
> <mailto:matthieu.monrocq at gmail.com>> wrote:
>
>>
>>
>> On Fri, Jan 25, 2013 at 7:23 PM, Enea Zaffanella
>> <zaffanella at cs.unipr.it <mailto:zaffanella at cs.unipr.it>> wrote:
>>
>>     Hello.
>>
>>     In ASTContext, we have methods such as
>>       QualType getSizeType() const
>>       QualType getPointerDiffType() const
>>       [...]
>>     that query TargetInfo, but there seems to be no method named
>>       QualType getIntPtrType() const
>>
>>     Would it be OK to add it?
>>
>>     Enea.
>>     _________________________________________________
>>     cfe-dev mailing list
>>     cfe-dev at cs.uiuc.edu <mailto:cfe-dev at cs.uiuc.edu>
>>     http://lists.cs.uiuc.edu/__mailman/listinfo/cfe-dev
>>     <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>
>>
>>
>> In this case, would it make sense to add a getUIntPtrType() for
>> `uintptr_t` as well ?
>
> It's not strictly necessary because of getCorrespondingUnsignedType, but
> that doesn't mean we shouldn't add it. getIntPtrType definitely makes
> sense to me.

Here is the patch. OK to commit?

Enea.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: getIntPtr.patch
Type: text/x-diff
Size: 1606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130126/f7c76360/attachment.patch>


More information about the cfe-dev mailing list