Hi, 
 
I have to run a pass which modifies the function types of all functions in a
a C file, by adding an extra parameter to each function. If this pass
runs like all other optimization passes, then this pass runs when each
function is being processed. So, for a prog like this:
 


int my_funct(int var, float hell)
{

  printf("%d",var);
}

int main()
{
  my_funct (4, 5.6);
}


if I modify the type of my_funct to take 3 args (int, int, float),
then the type checker ( which runs before my pass for "main" ) bombs
out saying that the call to "my_funct" has lesser than required
parameters. Where should I be running this pass? The way it looks is
that i need the pass manager to run my pass for all the functions,
instead of running all the passes for each function, and then
processing the next function. Is this possible to specify to the pass
manager?

Any help would be appreciated.

 

Thanks,

Prateek.

Reply via email to