#include <stdio.h>
#include <string.h>
int foo(char* a)
{ char str[10];
if (strlen(a)<10)
{
sprintf(str,"Yes");
puts(str);
return 0;
}
else
{
sprintf(str,"No");
puts(str);
return 1;
}
}
Now, lets say while writing a LLVM pass, I want to ensure that instead of calling sprintf, printf is called instead (with the same arguments). How could I go about doing that?