[Lldb-commits] [PATCH] D119178: Add support for generating debug-info for structured bindings of structs and arrays

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 15 14:20:04 PST 2022

shafik added inline comments.

Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4647
+                                                const bool UsePointerValue) {
+  assert(CGM.getCodeGenOpts().hasReducedDebugInfo());
+  assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!");
aprantl wrote:
> do you need a 
> ```
>  if (DebugKind > codegenoptions::LimitedDebugInfo)
>   return
> ```
> here?
That kind of check is only used in limited places, why would it apply here as let's say opposed to the `EmitDeclare` for `VarDecl` case?

Comment at: clang/test/CodeGenCXX/debug-info-structured-binding.cpp:3
+// CHECK: call void @llvm.dbg.declare(metadata %struct.A* %[[F:[0-9]+]], metadata ![[F:[0-9]+]], metadata !DIExpression())
+// CHECK: call void @llvm.dbg.declare(metadata %struct.A* %[[F:[0-9]+]], metadata ![[F:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, [[F:[0-9]+]]))
aprantl wrote:
> We should check what F is, too, right?
Actually I should have used a different match, that was a mistake.



More information about the lldb-commits mailing list