Identifying user define function through llvm pass
This post was updated on .
Is there anyway by which I can identify whether the callee function is a user define or not?
printf("hello world again");
As in this case foo() is a user define, whereas printf() is a library function.
The method I'm currently using is to iterate over all the modules and check if its size is greater than 0 or not.
for(Module::iterator F = M.begin(); F != M.end(); ++F)
Function &Func = *F;
errs() << "User Define";