[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2022-08-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Herald added a project: All. I've posted D131933 to revert this patch based on discussion in D123319 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. Looks like the first commit c958639098a8 is also causing a crash in chromium code, so I will revert that as well. I got a reduced test case: typedef void voidtype; struct S { voidtype a();

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Stella Stamenova via Phabricator via cfe-commits
stella.stamenova added a comment. This also broke a number of the tests on the Windows LLDB bot, so when you get around to resubmitting the change with a fix, please make sure the bot doesn't get broken again: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/12551 Repository:

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
SouraVX added a comment. Thanks @sammccall , for the test case. Seems like, this implementation doesn't address the lambda functions returning "auto". We're looking into this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D70524#1816492 , @sammccall wrote: > Following crashes for me with `clang++ -g2`: This crashes at 6d6a4590c5d4 but not at c958639098a8

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Following crashes for me with `clang++ -g2`: struct Thing { void crash(Thing ) { auto Lambda = [&] { Other.external(); }; Lambda(); } void external(); }; void test(Thing , Thing ) { A.crash(B); } Haven't yet

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This seems to have introduced a crash compiling libcxx. I'm currently reducing the crashing code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70524

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-12 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc958639098a8: [DWARF5][DebugInfo]: Added support for DebugInfo generation for auto return… (authored by awpandey, committed by SouraVX). Changed prior to commit:

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good - thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70524 ___ cfe-commits

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-10 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 237264. awpandey added a comment. @dblaikie I have added an LLVM test case and I will commit it like a different patch. I have also updated the clang test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1467-1468 if (Method->isStatic()) return cast_or_null( getOrCreateType(QualType(Func, 0), Unit)); + return getOrCreateInstanceMethodType(Method->getThisType(), Func, Unit, decl);

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-03 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 235998. awpandey added a comment. Herald added a subscriber: hiraditya. @dblaikie Thanks a lot for the suggestions. I have made the changes such that this will become consistent with your suggestions. CHANGES SINCE LAST ACTION

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1787566 , @SouraVX wrote: > > It looks like this implementation is a bit buggy in one way and incomplete > > in another: > > > > 1. even if the auto-returning function is defined, that function definition > > doesn't

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-17 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > "DW_TAG_unspecified_type auto" should be emitted for the function > declared/defined as auto returnning. Do you have other test cases in mind, > where above points diverges ?? The declaration would have DW_AT_type point to DW_TAG_unspecified_type, but the

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-17 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
SouraVX added a comment. > It looks like this implementation is a bit buggy in one way and incomplete in > another: > > 1. even if the auto-returning function is defined, that function definition > doesn't describe the concrete return type. Compare GCC and Clang's output for > your example

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1783363 , @probinson wrote: > > Hmm, maybe this feature/suggestion is broken or at least not exactly > > awesome when it comes to auto-returning functions that are eventually > > void-returning functions? Now the

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-13 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > Hmm, maybe this feature/suggestion is broken or at least not exactly awesome > when it comes to auto-returning functions that are eventually void-returning > functions? Now the function definition has no DW_AT_type to override the > unspecified_type in the

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-12 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1779179 , @awpandey wrote: > @dblaikie . I have removed the redundant test case. What else should I do in > this patch? Please address this warning before committing:

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-11 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 233289. awpandey added a comment. @dblaikie . I have removed the redundant test case. What else should I do in this patch? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70524 Files:

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1772961 , @probinson wrote: > > Perhaps we should implement this mode under -fno-standalone-debug (or > > something more aggressive) since "standalone" is one of the only places I > > can think of where having the

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > Perhaps we should implement this mode under -fno-standalone-debug (or > something more aggressive) since "standalone" is one of the only places I can > think of where having the full class definition would be handy You'd also want it for type units, so they

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1772690 , @probinson wrote: > In D70524#1772117 , @dblaikie wrote: > > > In D70524#1771709 , @probinson > > wrote: > > > > > In

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D70524#1772117 , @dblaikie wrote: > In D70524#1771709 , @probinson wrote: > > > In D70524#1771522 , @shafik wrote: > > > > > @probinson I was

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1771709 , @probinson wrote: > In D70524#1771522 , @shafik wrote: > > > @probinson I was reading the C++ "auto" return type > >

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D70524#1771522 , @shafik wrote: > @probinson I was reading the C++ "auto" return type > issue and I can't come up > with a case where we don't have class descriptions

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D70524#1767775 , @aprantl wrote: > @shafik Can you speak about whether this feature ("auto" return type in DWARF > v5 section 5.2) would be useful for LLDB? I agree with @dblaikie here, I can't come up with a scenario where

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1770330 , @awpandey wrote: > > It looks to me like there are a few tests for unspecified_type already: > > > > $ grep -r unspecified_type llvm/test > > llvm/test/Assembler/debug-info.ll:; CHECK-NEXT: !7 =

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey marked an inline comment as done. awpandey added a comment. > It looks to me like there are a few tests for unspecified_type already: > > $ grep -r unspecified_type llvm/test > llvm/test/Assembler/debug-info.ll:; CHECK-NEXT: !7 = !DIBasicType(tag: > DW_TAG_unspecified_type, name:

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-05 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 232281. awpandey marked 5 inline comments as done. awpandey added a comment. Hi @aprantl, I used variable as shown by you for showing links between the node. @dblaikie I have shortened the test case based on your suggestions. There were no test case for

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-03 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. @shafik Can you speak about whether this feature ("auto" return type in DWARF v5 section 5.2) would be useful for LLDB? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70524 ___

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D70524#1761514 , @awpandey wrote: > Hi @aprantl and @dblaikie. Currently, there is no test case for the > unspecified type, so I have added that in the regression test suite. It looks to me like there are a few tests for

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-12-02 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2925 +return C.getQualifiedType(T.getTypePtr(), Quals); + } case Type::DeducedTemplateSpecialization: { aprantl wrote: > You need to mark this `LLVM_FALLTHROUGH` now

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-27 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 231208. awpandey marked 5 inline comments as done. awpandey added a comment. Hi @aprantl and @dblaikie. Currently, there is no test case for the unspecified type, so I have added that in the regression test suite. Also, I have incorporated all of your

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In D70524#1757237 , @dblaikie wrote: > Generally if you're not touching LLVM code, I would suggest not adding an > LLVM test - unless this is new or surprising usage of existing LLVM > functionality (or the functionality was

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Generally if you're not touching LLVM code, I would suggest not adding an LLVM test - unless this is new or surprising usage of existing LLVM functionality (or the functionality was otherwise undertested in LLVM previously). But I'm guessing that's not the case here?

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: llvm/test/DebugInfo/X86/debug-info-auto-return.ll:1 +;RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump -v - | FileCheck %s + I don't think the FORMs are relevant for this test, so we can do without the `-v`

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: llvm/test/DebugInfo/X86/debug-info-auto-return.ll:30 +; CHECK: DW_TAG_subprogram [7] * +; CHECK-NEXT: DW_AT_linkage_name [DW_FORM_strx1](indexed (0007) string = "_ZN7myClass7findMaxEv") +; CHECK: DW_AT_type [DW_FORM_ref4]

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2925 +return C.getQualifiedType(T.getTypePtr(), Quals); + } case Type::DeducedTemplateSpecialization: { You need to mark this `LLVM_FALLTHROUGH` now or you'll get a

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey marked 2 inline comments as done. awpandey added a comment. Thanks @aprantl for your suggestions. I have revised by patch based on that. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70524 ___

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-22 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 230601. awpandey marked 3 inline comments as done. awpandey added a comment. This revision includes 1. Added check for return type it is attached to the exact node we're expecting it to. 2. Removed unnecessary strings and checks. CHANGES SINCE LAST

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-21 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:822 + auto BTName = "auto"; + return DBuilder.createUnspecifiedType(BTName); +} ` DBuilder.createUnspecifiedType("auto")` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-21 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Thanks! Couple of minor comments inline. Comment at: clang/test/CodeGenCXX/debug-info-auto-return.cpp:2 +// Test for debug info for C++11 auto return member functions +// Supported: -O0, standalone DI +// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2019-11-20 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey created this revision. awpandey added reviewers: jini.susan.george, SouraVX, alok, aprantl, dblaikie. awpandey added projects: clang, LLVM, debug-info. Herald added subscribers: llvm-commits, cfe-commits, ormris. This patch will provide support for auto return type for the C++ member