[cfe-commits] r65510 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Daniel Dunbar daniel at zuster.org
Thu Feb 26 10:56:30 PST 2009


On Thu, Feb 26, 2009 at 8:56 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Feb 26, 2009, at 1:34 AM, Eli Friedman wrote:
>
>> On Wed, Feb 25, 2009 at 11:21 PM, Daniel Dunbar <daniel at zuster.org> wrote:
>>>
>>>  } else if (Ty->isPointerLikeType() || Ty->isBlockPointerType() ||
>>> +             Ty->isObjCQualifiedIdType() ||
>>>             Ty->isObjCQualifiedInterfaceType()) {
>>
>> It's getting to the point where we use the pattern isPointer ||
>> isBlockPointer || isObjCQualId || isObjCQualInterface in a lot of
>> places, and are using incomplete versions of it in a lot of others.
>> Maybe a new predicate would be appropriate?

Definitely, you caught me being lazy. I just wanted a quick fix but we
need to clean this up.

> Maybe block pointers and objc qualified id's and qualified interfaces should
> inherit from PointerLikeType?  Then we could use isPointerLikeType?

I've never been clear on what isPointerLikeType is supposed to mean.
It looks like it is basically unused now, since Doug has redone how
references are handled. We could reclaim the name, although I think
the appropriate predicate is hasPointerRepresentation or so; this is
largely a IRgen notion that some source level construct is represented
in the backend using just a pointer.

Sema in generally probably should not be using such a predicate; and I
don't really think id type should have a getPointeeType method, so I'm
not sure if these things should actually have a common base. A
convenience predicate seems appropriate.

 - Daniel




More information about the cfe-commits mailing list