Open Quuxplusone opened 6 years ago
Attached src.cc
(243 bytes, text/x-c++src): source file
We emit debug info for parameters during CodeGenFunction::EmitFunctionProlog, and marking a function naked prevents prologue emission, as expected.
To fix it, we'd need to emit llvm.dbg.value intrinsics instead of llvm.dbg.declare intrinsics, since all we have are SSA registers to talk about, no allocas. We'd need to call DIBuilder::insertDbgValueIntrinsic.
What Reid said sounds about right.
Another thing we could do/check is that the parameter DILocalVariables end up in the "retainedNodes" list associated with the DISubprogram. So the function type is correct even if no locations are identified inside the function.
src.cc
(243 bytes, text/x-c++src)