On 11-11-10 17:23 , Delesley Hutchins wrote:
+ {
+ tree callee = gimple_call_fn (call);
+ if (TREE_CODE (callee) == OBJ_TYPE_REF)
+ {
+ tree objtype = TREE_TYPE (TREE_TYPE (OBJ_TYPE_REF_OBJECT (callee)));
+ /* Check to make sure objtype is a valid type.
+ OBJ_TYPE_REF_OBJECT does not always return the correct static
type of the callee.
+ For example: Given foo(void* ptr) { ((Foo*)
ptr)->doSomething(); }
+ objtype will be void, not Foo. Whether or not this happens
depends on the details
+ of how a particular call is lowered to GIMPLE, and there is no
easy fix that works
+ in all cases. For now, we simply rely on gcc's type information;
if that information
+ is not accurate, then the analysis will be less precise.
Re-format for 80 cols.
OK with that change.
Diego.