find external function from other module within module pass

Hello,
I have a module pass as well as a function pass which I’m invoking on shared library LLVM IR .so (which has multiple C source files). The library has linked external functions from another module (shared library), how do I identify those functions which are not defined in the current module.
Tried the DI LLVM API.
Would really appreciate any help.