[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-06 Thread Namhyung Kim via cfe-commits
namhyung wrote: Also I think it generates variables for destination of pointers, not the source. For example, if we have `a->b->c`, what we need is variables for `a` and `b`. Usually it would already have one for `a`, so it can skip generating it (unless there's a difference like due to type

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-06 Thread Namhyung Kim via cfe-commits
@@ -5636,6 +5636,31 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(llvm::AllocaInst *Alloca, QualType Ty, + SourceLocation Loc) { + llvm::DIFile *Unit