How to identify a library function call in IR?

Hi all,

Recently I've been working on LLVM IR. I need to identify function calls to a dynamic library, like glibc. I found isDeclaration() of Function class might be useful. So could it identify external function calls? Is there a more graceful way of identifying such calls?

Moreover, when used in a link-time optimization pass, will it give out different results from those when used in normal optimization pass?

Thanks and Regards.