How to know if function has a body in a different module

Hello Everyone,

I am wondering if there is a way to identify if function is defined in any other module? For example suppose file A calls a function foo and it’s body is defined in file B.
I have a llvm pass which runs on module, how can I know from call instruction, that called function has a body in a different module.

Any help would be appreciated.

Regards,
Sangeeta