[LLVMdev] collect end line number for scope

Eric Christopher echristo at apple.com
Tue Oct 4 09:35:58 PDT 2011


On Oct 4, 2011, at 4:32 AM, Pankaj Gode wrote:

> Hi,
>  
> My problem definition is to collect "end line" for each scope (i.e. start and end line for a scope). I need to dump this information while emitting target code for an architecture. Though I understand that scoping details are not modeled in LLVM. Reference: http://llvm.org/docs/SourceLevelDebugging.html#format_common_lifetime
> 

You have misread this link. We use metadata attached to instructions to model scopes. Look for DW_TAG_lexical_block in the output. I'm working on this area at the moment to make it more precise, but for the general case this should work just fine.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111004/028f320f/attachment.html>


More information about the llvm-dev mailing list