generating !llvm.dbg.sp

Hello,

According to the documentation here - http://llvm.org/docs/SourceLevelDebugging.html:

All subprogram descriptors are collected by a named metadata !llvm.dbg.sp.

LLVM seems to have lost the ability to generate this metadata node in r126871, when DIFactory was removed.

Is this an intended change? We were relying in the existence of this node, and things broke once we switched from LLVM 2.8 to 3.0.

Is there an alternative location where all the subprogram debug descriptors (DW_TAG_subprogram) can be obtained?

Thanks in advance,

Eli

Hello,

According to the documentation here -http://llvm.org/docs/SourceLevelDebugging.html:

>> All subprogram descriptors are collected by a named metadata!llvm.dbg.sp.

LLVM seems to have lost the ability to generate this metadata node in r126871, when DIFactory was removed.

Is this an intended change?

Yes, I'll update the doc.

We were relying in the existence of this node, and things broke once we switched from LLVM 2.8 to 3.0.
Is there an alternative location where all the subprogram debug descriptors (DW_TAG_subprogram) can be obtained?

You can use DebugInfoFinder from DebugInfo.h. It provides an iterator to walk over all subprograms.

Thanks. Note that there are still a few references to this MDNode scattered throughout the code-base, so if it’s no longer being generated, there may be some bugs lurking there.

Eli

Thanks. I'll get them. :slight_smile:

-eric

Thanks Eric. I know some of the references are in the code used for backward compatibility.

Eric, Devang,

FYI exactly the same applies for llvm.dbg.gv – it’s also still listed in the docs and in various places throughout the code, although no longer generated.

Eli

I’ve opened PR 12050 to track the problem with llvm.dbg.gv

Eli

OK. I've cc'd myself on it.

-eric