[llvm-dev] [Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
via llvm-dev
llvm-dev at lists.llvm.org
Sun Apr 1 11:17:59 PDT 2018
Binding the alloca to the debug-info metadata is not automatic. You need to emit an intrinsic function call to llvm.dbg.declare to bind the two together.
If you are simply trying to emit DWARF for your program, the rest of the processing should already be in place for that. If you are trying to do something else, you would need to describe that so we understand what you need.
--paulr
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Vivien Millet via llvm-dev
Sent: Saturday, March 31, 2018 7:33 AM
To: llvm-dev
Subject: [llvm-dev] [Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi,
First, considering I'm using an IRBuilder and a DIBuilder to build my program, how can I automatically bind the CreateAlloca with my named local variable inside the DIBuilder ? Is it automatic with the Twine name of CreateAlloca ? And/Or should I use DIBuilder::createAutoVariable and how ?
Then, I'm wondering how to locate back my local variable in memory (register or stack) once i have a DwarfContext ready.
I'm a bit lost with all this pipeline, sorry If my question seem trivial.
Thanks !
Vivien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180401/48a8c514/attachment.html>
More information about the llvm-dev
mailing list