News for hackers. Stuff that matters.
Re:A Complete Guide to LLVM for Programming Language Creators by jmorse2 on Saturday December 26, 2020 @06:49AM (#25542865)
> I'd like to learn more about this. Maybe contribute to the compiler and fix this issue.

You need to create a call to the `llvm.dbg.declare` intrinsic that connects the stack variable alloca to a DILocalVariable metadata node, and place the call after the stack variable alloca. The rest of LLVM will handle tracing the stack location through the compiler to the output, including the alloca being promoted.

See: https://llvm.org/docs/SourceLevelDebugging.html#debugger-int...

There are no comments on this comment yet.