This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GIMPLE Question


I have the following code:

foo.hh
======

class A
{
};

class foo
{
  A a;
public:
    void bar(A & aa);
};


foo.cc
======

#include "foo.hh"

void foo::bar(A & aa)
{
  a = aa;
}


However the gimple generated via g++-4.5 -c -fdump-tree-gimple foo.cc 

is this:

void foo::bar(A&) (struct foo * const this, struct A & aa)
{
  GIMPLE_NOP
}


My question is this, what do I have to do to get the contents of the bar
method?  I am working on a plugin that traverses the AST and GIMPLE but
I cannot seem to get the contents of methods similar to this example...
all I get is a GIMPLE_NOP.  When the method is a little more complex I
get the proper gimple and all is well .... but simple methods elude me. 

Is there gimple for such a simple method or do I have to delve into the
some other part of the AST in order to get the information I need?  Any
hints as to how I would go about doing that?

Cheers,

Kyle





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]