[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

Michael Buch via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 08:42:51 PST 2023


================
@@ -5596,6 +5587,42 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, const APValue &Init) {
       TemplateParameters, Align));
 }
 
+void CGDebugInfo::EmitGlobalVariable(const VarDecl *VD) {
+  assert(VD->hasInit());
+  assert(CGM.getCodeGenOpts().hasReducedDebugInfo());
+  if (VD->hasAttr<NoDebugAttr>())
+    return;
+
+  auto &GV = DeclCache[VD];
----------------
Michael137 wrote:

Good catch, I'll err on the side of caution and not do that

https://github.com/llvm/llvm-project/pull/71780


More information about the cfe-commits mailing list