[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Michael Buch via cfe-commits
Michael137 wrote: > Given the libc++ experience, let's move forward with this PR as-is. If > there's an issue in practice, we'll disable the tests on changes to Clang at > that point. Do note that libc++ CI only runs a subset of the LLDB tests. Only the ones that are impacted by libc++. We

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-04 Thread Michael Buch via cfe-commits
Michael137 wrote: > Oh, this is not wanted. It should be almost a NFC patch for users. I'll > revert it. Thanks! https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-04 Thread Michael Buch via cfe-commits
Michael137 wrote: Unfortunately this is still failing one test on the macOS CI: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/5083/execution/node/97/log ``` == FAIL: test_duplicate_decls_gmodules

[clang] [llvm] Enable LLDB tests in pre-merge CI (PR #94208)

2024-06-03 Thread Michael Buch via cfe-commits
Michael137 wrote: > @Michael137 This is for Linux. Windows works the same way just below those > lines: > > https://github.com/llvm/llvm-project/blob/9a7bd8a60f03595be5d42315790df6d409f81091/.ci/generate-buildkite-pipeline-premerge#L253-L255 Ah, so what would the issue be with just adding

[clang] [llvm] Enable LLDB tests in pre-merge CI (PR #94208)

2024-06-03 Thread Michael Buch via cfe-commits
Michael137 wrote: > > Should we just run the tests for the LLDB C++ language plugin (i.e., the > > part of LLDB that invokes Clang and the JIT). And then we could expand the > > set of tests from there later? > > In the bash script that currently handles this, "targets that we need to >

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-03 Thread Michael Buch via cfe-commits
Michael137 wrote: I.e., also broke the macOS LLDB buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/2637/execution/node/97/log/ ``` Assertion failed: (!((*IDAddress) >> 48) && "We should only set the module ID once"), function setOwningModuleID, file DeclBase.cpp,

[clang] [llvm] Enable LLDB tests in pre-merge CI (PR #94208)

2024-06-03 Thread Michael Buch via cfe-commits
Michael137 wrote: Worth a shot i guess. Though it could be somewhat disruptive if we do in fact have flaky tests. I don't think we need to run *all* tests. Should we just run the tests for the LLDB C++ language plugin (i.e., the part of LLDB that invokes Clang and the JIT). And then we could

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-31 Thread Michael Buch via cfe-commits
Michael137 wrote: > The correct answer here is probably to fix the sizes in the RecordLayout > itself; in particular, the DataSize of the members. That would be ideal, but also means we'd have to reflect the various C++ attributes that affect layout in DWARF. Avoiding adding such

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/3] [clang][lldb] Don't assert structure layout correctness

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/2] [clang][lldb] Don't assert structure layout correctness

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/93809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/93809 This is the outcome of the discussions we had in https://discourse.llvm.org/t/rfc-lldb-handling-no-unique-address-in-lldb/77483 To summarize, LLDB creates AST nodes by parsing debug-info and hands those off

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-29 Thread Michael Buch via cfe-commits
Michael137 wrote: I'm going to revert this for now until since the bots have been red for a while now https://github.com/llvm/llvm-project/pull/92865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-05-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > @Michael137 said: > > > Btw, as a follow-up to this patch should we check that this is compatible > > with dsymutil (i.e., running dsymutil --verify)? I suspect it might need a > > fixup (given LLDB doesn't even support this tag) Yup, dsymutil looks good now, thanks >

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-02 Thread Michael Buch via cfe-commits
Michael137 wrote: `18707f53d6d2665634373847a0e9bdcbcac88c57` https://github.com/llvm/llvm-project/pull/90717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PGO][test] Relax FileCheck patterns in debug-info-instr_profile_switch.cpp (PR #90916)

2024-05-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/90916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PGO][test] Relax FileCheck patterns in debug-info-instr_profile_switch.cpp (PR #90916)

2024-05-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/90916 Caused build-bot failures on various platforms. >From 062311676d54dadeae4f463fcf5dcc9ef8d1d971 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 3 May 2024 00:25:24 +0100 Subject: [PATCH]

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-02 Thread Michael Buch via cfe-commits
Michael137 wrote: Broke some build bots. Fixing... https://github.com/llvm/llvm-project/pull/90717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/90717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/90717 >From 94c812abc4e528d3d3cb96fa3c3b7f78b6a87a91 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 1 May 2024 11:03:08 +0100 Subject: [PATCH 1/2] [clang][PGO] Apply artificial DebugLoc to

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/90717 Prior to this change the debug-location for the `llvm.instrprof.increment` intrinsic was set to whatever the current DIBuilder's current debug location was set to. This meant that for switch-statements, a

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-04-25 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/90032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix template alias default DWARF version (PR #89594)

2024-04-22 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/89594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \ +// RUN: | FileCheck %s + + Check that -gtemplate-alias causes DW_TAG_template_alias emission for + template

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. LGTM, if @pogo59 and @dwblaikie are happy with the driver changes https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \ +// RUN: | FileCheck %s + + Check that -gtemplate-alias causes DW_TAG_template_alias emission for + template

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-18 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1313,6 +1313,61 @@ llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty, return DBuilder.createPointerType(EltTy, Size); } +static llvm::SmallVector +GetTemplateArgs(const TemplateDecl *TD, const TemplateSpecializationType *Ty) { +

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Michael Buch via cfe-commits
Michael137 wrote: Btw, as a follow-up to this patch should we check that this is compatible with dsymutil (i.e., running `dsymutil --verify`)? I suspect it might need a fixup (given LLDB doesn't even support this tag) https://github.com/llvm/llvm-project/pull/87623

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Michael Buch via cfe-commits
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) { return T.Reconstitutable; } -std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { +bool CGDebugInfo::HasReconstitutableArgs( +ArrayRef Args) const { + return llvm::all_of(Args,

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-12 Thread Michael Buch via cfe-commits
Michael137 wrote: LGTM, but would like @rjmccall or @AaronBallman (or another code-owner) to give final approval https://github.com/llvm/llvm-project/pull/84384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/84384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-12 Thread Michael Buch via cfe-commits
@@ -251,15 +423,16 @@ class Qualifiers { } // Deserialize qualifiers from an opaque representation. - static Qualifiers fromOpaqueValue(unsigned opaque) { + static Qualifiers fromOpaqueValue(uint64_t Opaque) { Qualifiers Qs; -Qs.Mask = opaque; +Qs.Mask =

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-11 Thread Michael Buch via cfe-commits
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) { return T.Reconstitutable; } -std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { +bool CGDebugInfo::HasReconstitutableArgs( +ArrayRef Args) const { + return llvm::all_of(Args,

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-11 Thread Michael Buch via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s Michael137 wrote: Do we now lose a tiny bit of coverage for `-glldb`? I assume this change is to make sure

[clang] [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (PR #84891)

2024-03-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/84891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (PR #84891)

2024-03-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/84891 It is not uncommon for LLDB users to dig into internal implementation details of system types (including the STL). LLDB's expression evaluator makes use of Clang's code-completion facilities but currently

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer

[clang] [llvm] [clang-tools-extra] [lldb] [lldb][test] Add tests for target.max-string-summary-length setting (PR #77920)

2024-01-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/77920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang-tools-extra] [llvm] [lldb][test] Add tests for target.max-string-summary-length setting (PR #77920)

2024-01-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/77920 >From 4de3716b55a22dc8b7dda621889089f390026739 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 12 Jan 2024 12:34:16 + Subject: [PATCH 1/2] [lldb][test] Add tests for

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-08 Thread Michael Buch via cfe-commits
Michael137 wrote: @dwblaikie merged the fix, let me know if you're still seeing problems https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-08 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-08 Thread Michael Buch via cfe-commits
Michael137 wrote: Tried to find a way to test "objective-c fields aren't reordered". After talking to some objective-c experts, there doesn't seem to be a good way to force such "incorrect field order", because it's strictly an in-order language. Reducing the LLDB crashes has been tricky

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: Proposed fix: https://github.com/llvm/llvm-project/pull/77155 https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Yes, in the totally reduced reproducer - another debugger might be able to do > this name lookup with only a declaration, but I understand that at least > Clang's AST expression evaluator wouldn't be able to handle this case. > (though perhaps the lldb-eval work will

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: I guess if there's some other type of ObjC decl that could trigger the re-ordering that would be useful. https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > I can not check what caused exactly the problems but the change looks correct > and in change D154764 there seems to be no reason for re-ordering at > non-record objects. As an improvement, some tests could be added that check > for re-ordering at `RecordDecl` and (this is

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/77079 >From 544e2b12695fa572b08abc8efdceeadd63ebbde5 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 5 Jan 2024 10:41:55 + Subject: [PATCH 1/2] [clang][ASTImporter] Only reorder fields of RecordDecls

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: Need to sort out some test failures https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/77079 Prior to `e9536698720ec524cc8b72599363622bc1a31558` (https://reviews.llvm.org/D154764) we only re-ordered the fields of `RecordDecl`s. The change refactored this logic to make sure `FieldDecl`s are imported

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-04 Thread Michael Buch via cfe-commits
Michael137 wrote: Ah looks like in `GetClangDeclForDIE`, when trying to parse the `DW_AT_specification` that the CU-level `DW_TAG_variable` points to, we now try to `CreateVariableDeclaration`, because the static member is a `DW_TAG_variable` too. Whereas previously we would just fall-through

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-03 Thread Michael Buch via cfe-commits
Michael137 wrote: > Yeah, that seems to do it: > > ``` > > struct t1 { > > t1(); > > static int i; > > }; > > int t1::i = 43; > > int main() { > > } > > ``` > > ``` > > $ clang++-tot -gsplit-dwarf -g test.cpp > > $ lldb ./a.out -o "b main" -o "run" -o "p t1::i" -batch > > This

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-03 Thread Michael Buch via cfe-commits
Michael137 wrote: > Should've mentioned this earlier, but we've been seeing crashes in lldb due > to this change (though possibly related to our use of GALA python/gdb interop > https://github.com/sivachandra/gala - we haven't isolated the failures from > that yet (though we've been using it

[lldb] [clang] fixing issue #64441 (PR #74814)

2023-12-08 Thread Michael Buch via cfe-commits
@@ -56,10 +56,10 @@ namespace Foo = A::B; // namespace alias using Foo::myfunc; // using declaration -using namespace Foo;// using directive +//removing namespace foo; for quality naming Michael137 wrote: The `using` directive was used here to

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/74580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > > To support access to such constants from LLDB we'll most likely have to > > have to make LLDB find the constants by looking at the containing class > > first. > > Tangentially related to: >

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > Do you need me to merge that for you? Was going to wait until some more people had the chance to look. But if urgent, I don't think there should be any trouble merging this sooner https://github.com/llvm/llvm-project/pull/74580

[lldb] [clang] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74580 >From fe9624fdf898a2a629bb34f070d0e084f6dc0aa9 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 5 Dec 2023 14:52:00 + Subject: [PATCH 1/2] [clang][DebugInfo] Revert "emit variable definitions for

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][DebugInfo] Revert "emit variable definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/74580 This commit reverts the changes in https://github.com/llvm/llvm-project/pull/71780 and all of its follow-up patches. We got reports of the `.debug_names/.debug_gnu_pubnames/gdb_index/etc.` sections growing

[clang] c80b91b - [clang][DebugInfo][test] Remove unchecked member variable in debug-info-static-inline-member

2023-11-30 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-11-30T11:13:36Z New Revision: c80b91bce3a5a92281ad1c7e090ac25e7a5bd395 URL: https://github.com/llvm/llvm-project/commit/c80b91bce3a5a92281ad1c7e090ac25e7a5bd395 DIFF: https://github.com/llvm/llvm-project/commit/c80b91bce3a5a92281ad1c7e090ac25e7a5bd395.diff LOG:

[clang-tools-extra] [clang] [llvm] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-30 Thread Michael Buch via cfe-commits
Michael137 wrote: Test fix in flight... https://github.com/llvm/llvm-project/pull/72974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/72974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72974 >From 012096290352438668d8f4bb7a97179952a87a3a Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sat, 18 Nov 2023 00:20:05 + Subject: [PATCH] [clang][DebugInfo] Create evaluateConstantInitializer helper

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: > Looks like LLDB linux buildbot isn't happy, checking... Fix in https://github.com/llvm/llvm-project/pull/73707 https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: Looks like LLDB linux buildbot isn't happy, checking... https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: > > I do wonder how feasible it would be for the downstream tests to be > > adjusted to look at the `DW_AT_location`.. > > As I mentioned on the other thread, the point is not to have to read the > value from the process-under-debug. This is not efficient in a >

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: I do wonder how feasible it would be for the downstream tests to be adjusted to look at the `DW_AT_location`.. https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: FYI @petrhosek https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/73626 In #71780 we started emitting definitions for all static data-members with constant initialisers, even if they were constants (i.e., didn't have a location). We also dropped the DW_AT_const_value from the

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

2023-11-27 Thread Michael Buch via cfe-commits
Michael137 wrote: > Can we add back the constant to the declaration? It's been a week and the > progress on #72730 seems to have stalled while our builders are still broken. Yup will do, apologies for the noise https://github.com/llvm/llvm-project/pull/71780

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-27 Thread Michael Buch via cfe-commits
Michael137 wrote: > Would confuse `DwarfDebug` without your changes/this patch? Or only with this > patch? (& hopefully there's some way to reach the merge globals > functionality/problem/interesting IR from clang itself - but I guess even if > it isn't, this is still a demonstration of

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-27 Thread Michael Buch via cfe-commits
Michael137 wrote: > @Michael137 is this patch ready to land? We (I have took over the bug from > @ilovepi ) have a few builders that are currently blocked by the behavior > change introduced in PR #70639 . It would be great if this change can be > landed timely. Thx. Nope this isn't ready

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-22 Thread Michael Buch via cfe-commits
Michael137 wrote: > Do we end up with two DIGlobalVariableExpressions? Just checked. With this patch, MergeGlobals would produce following IR: ``` ... !10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression(DW_OP_plus_uconst, 4, DW_OP_constu, 200, DW_OP_stack_value)) !11 = distinct

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-21 Thread Michael Buch via cfe-commits
Michael137 wrote: > > My understanding was that the DIExpression parameter to > > DIGlobalVariableExpression was empty for global variables with locations. > > So the patch just encodes the constant into that expression if it's > > otherwise empty. > > I think in theory it can be non-empty

[clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72974 >From 012096290352438668d8f4bb7a97179952a87a3a Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sat, 18 Nov 2023 00:20:05 + Subject: [PATCH] [clang][DebugInfo] Create evaluateConstantInitializer helper

[clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/72974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-21 Thread Michael Buch via cfe-commits
Michael137 wrote: I extracted the parts that are clean-ups/bugfixes into a new PR: https://github.com/llvm/llvm-project/pull/72974 https://github.com/llvm/llvm-project/pull/72730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/72974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/72974 This patch extracts the logic to evaluate a C++ static data-member's constant initializer such that it can be used by an upcoming patch. It also makes the check for whether we are dealing with a constant

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

2023-11-20 Thread Michael Buch via cfe-commits
Michael137 wrote: > I'm unclear on the specifics of the check, but it's probably something we can > adjust if that is the long-term solution. > > CC @petrhosek Since he was interested in getting this resolved soon. There's a few things left to iron out with

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-20 Thread Michael Buch via cfe-commits
Michael137 wrote: > Hmm, I can't quite tell from the test case updates in the patch, at least at > a glance: How does this get encoded at the IR level? Do we end up with two > DIGlobalVariableExpressions? One with the constant value expresison, and one > that references the actual global

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-20 Thread Michael Buch via cfe-commits
Michael137 wrote: This will need a slight tweak in DwarfCompileUnit because it currently doesn't attach a DW_AT_location to global variable DIEs that already have a DW_AT_const_value https://github.com/llvm/llvm-project/pull/72730 ___ cfe-commits

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-20 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72730 >From 6dcb09dcc50a9b9e92640412242927b3e226929e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sat, 18 Nov 2023 00:20:05 + Subject: [PATCH 1/8] [clang][DebugInfo][NFC] Create

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-20 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/72730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >