metadata in callgraph

Hi All,

It seems that functions in callgraph remove all metadata info, such as dbg.

Can I keep metadata in callgraph?


Hmm? Can you be more specific? i.e. things like inlining are CGSCC passes and handle debug information just fine.


Hi Eric,

Thanks for your reply. I use CallGraphWrapperPass to traverse the call graph.

for (CallGraph::iterator i =…) {
for (CallGraphNode::iterator j = …) {
Function *func = j->second->getFunction();
//dump all instructions in func

I tried my pass on a small toy program. It can print dbg info for each instruction.

However, when I tried on transmission software, it reports an warning: “warning: ignoring debug info with an invalid version (1) in transmissioncli.bc”.
And all dbg info was removed.

I compiled transmission with clang 3.6.1. Any suggestion?


When I run my Pass on an example *.c , i

So the warning that you’re getting is exactly what’s going on. You’re trying an old version of the debug information metadata with a newer llvm. You should likely use a newer clang if you’re going to work with a newer llvm or an older llvm if you’re going to work with an older clang.