How can I determine where a function came from in a module?

Hello,

I am trying to write a pass to apply a transformation only to functions that came directly from the source code I am compiling, and not any included external libraries. For instance, if I am using the C++ standard library, I do not want to apply the transformation to the standard library itself. Is there any way in LLVM to distinguish functions based on where they came from? Thanks!

Best,
Shishir Jessu