a question about funtion information

Hi, every one,

I want to know a function linked from which object in llvm bitcode, how should I do?

for example, when I get the function named xxx, I want to know function xxx whether is from libc library or other object.

I have used the linkage type to check it, but functions in libc or my program are both ExternalLinkage.

thanks.

Hi, every one,

I want to know a function linked from which object in llvm bitcode,
how should I do?
for example, when I get the function named xxx, I want to know
function xxx whether is from libc library or other object.

I have used the linkage type to check it, but functions in libc or my
program are both ExternalLinkage.

thanks.

The only way of which I can think to do this is to examine the debug metadata associated with the function to determine the name of the source file from which it comes. However, that requires knowing the difference source file names for libc, and I think debug information may not be present. At best, it’s a heuristic solution. Regards, John Criswell