-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AST] explicit PrintOptions default constructor #18142
Conversation
This looks like an LLDB bug. There should be no circumstances where Clang can synthesize a default constructor but LLDB can't (other than the template instantiation thing you mentioned). We generally use the |
It's a know issue with current debuggers (not only LLDB). Templates are not described in the debug information, only template instantiations, thus the debugger doesn't know about anything that hasn't been instantiated. Even if it's been instantiated but all the instances have been inlined, the debugger won't be able to access it. |
Sorry, we were asking about the default constructor part, not the template part. |
Oh, I see. Sounds more like a Clang bug than and LLDB one. I suppose what happens is that Clang doesn't emit the debug info describing implicitly generated constructors? |
If I'm understanding correctly, this is a case where the constructor wasn't generated, but it should be possible for LLDB to generate it. |
Currently LLDB never generates methods/*tors, it just calls them and they have to be present in the generated image. We are playing with the idea of generating what's not there, but it is quite tricky. If the error message about implicitly deleting the constructor is correct, lldb would not have been able to generate it anyway. If the error message is incorrect, then it's worth an LLDB bug report. |
Thanks to response. I know about Anyway I understand about lldb behavior and thanks to tell details. I will investigate about using |
@jrose-apple Hello.
If Former see resolved type information. I am diving into ConstraintSystem, so its very complex. It is a problem that default constructor value of |
All right. Please add a comment that says "This is explicit to guarantee that it can be called from LLDB", or something similar. |
Thanks! I will do later. |
42ed1fd
to
2cfff84
Compare
@jrose-apple Please review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you tried using PrintOptions() = default
and it doesn't work? Otherwise, lgtm.
@swift-ci please test |
Build failed |
Build failed |
This PR add default constructor of
PrintOptions
explicitly.This is already implemented by c++ compiler implicitly.
But, it can not be called from lldb session.
If I add this explicitly, it become available.
This is very useful for reading and studying swift compiler source code with debugger.
supplement
If I add default constructor of
BracketOptions
to follow error message,It still can not be called because of another error.
lldb seems can not call templated symbol which has not been instantiated.