On 25 April 2006 04:22, sean yang wrote:
> I want to insert the instrumentation code no matter from what language the
> MPI subroutines are called.
> I think I can take care of C and Fortran by the following (psuedo) code, but
> how can i find the rule for c++ name mangling? are there many cases that I
> need take care of?
>
> if (TREE_CODE ( t ) == FUNCTION_DECL){
>
> if (( !strncmp (IDENTIFIER_POINTER(DECL_NAME (t) , "mpi_", 4) || (
> !strncmp (IDENTIFIER_POINTER(DECL_NAME (t) , "_mpi_", 5)) {
> //(1) handles case of C language; (2) handle the case of Fortran
> }
>
> }
Why not cut right through your mess and declare your function extern "C"?
cheers,
DaveK
--
Can't think of a witty .sigline today....