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

via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 13:39:38 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 7c7882fcffbfd204f95a3613ce076abf7da294e8 4784e02edb23b23a6e2cabfa3f7eb20c3ee441c4 -- clang/test/CodeGenCXX/debug-info-static-inline-member.cpp clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CGDebugInfo.h clang/test/CodeGenCXX/debug-info-class.cpp clang/test/CodeGenCXX/debug-info-static-member.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 20d7f1766948..b336c5b8e3ac 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -5617,9 +5617,10 @@ void CGDebugInfo::EmitGlobalVariable(const VarDecl *VD) {
   // Omit linkage name for variable definitions that represent constants.
   // There hasn't been a need from consumers yet to have it attached.
   GV.reset(DBuilder.createGlobalVariableExpression(
-      TheCU, DeclName, /* LinkageName */ {}, Unit, LineNo, getOrCreateType(T, Unit),
-      true, true, InitExpr, getOrCreateStaticDataMemberDeclarationOrNull(VD),
-      TemplateParameters, Align, Annotations));
+      TheCU, DeclName, /* LinkageName */ {}, Unit, LineNo,
+      getOrCreateType(T, Unit), true, true, InitExpr,
+      getOrCreateStaticDataMemberDeclarationOrNull(VD), TemplateParameters,
+      Align, Annotations));
 }
 
 void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,

``````````

</details>


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


More information about the lldb-commits mailing list