[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] A question about IASTLiteralExpression

Did you try getRawSignature on the IASTLiteralExpression?

 

Doug Schaefer, QNX Software Systems

Eclipse CDT Project Lead, Tools PMC member

http://cdtdoug.blogspot.com

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Yuan Zhang
Sent: Thursday, July 06, 2006 9:44 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] A question about IASTLiteralExpression

 

Go back to my original problem: I tried to traverse the AST of an MPI program and recognized all barrier function calls and their communicators. The barrier function has the form:

int MPI_Barrier(MPI_Comm comm). The MPI_Comm type is defined in mpi.h . A typical use of this barrier function is like MPI_Barrier(MPI_COMM_WORLD), and the communicator MPI_COMM_WORLD is a pre-defined object with type MPI_Comm. I don't think MPI_COMM_WORLD is a macro.

 

When I looked into the AST, the MPI_COMM_WORLD is a IASTLiteralExpression, and its value() is a char array "0x44000000". It really confused me. I am wondering whether I can get the String "MPI_COMM_WORLD" in some way?

 

Thanks,

 

Yuan


 

On 7/6/06, Doug Schaefer <DSchaefer@xxxxxxx> wrote:

IASTLiteralExpression is an IASTNode.

 

Doug Schaefer, QNX Software Systems

Eclipse CDT Project Lead, Tools PMC member

http://cdtdoug.blogspot.com