Skip to content

Move DWARFImporterDelegate into ClangImporter and remove DWARFImporter. #26648

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

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

adrian-prantl
Copy link
Contributor

@adrian-prantl adrian-prantl commented Aug 14, 2019

This refactors DWARFImporter to become a part of ClangImporter, since
it needs access to many of its implementation details anyway. The
DWARFImporterDelegate is just another mechanism for deserializing
Clang ASTs and once we have a Clang AST, the processing is effectively
the same.

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#1884

@adrian-prantl
Copy link
Contributor Author

This doesn't even compile yet, but it shows the direction I'm going, in case someone has early feedback.

This refactors DWARFImporter to become a part of ClangImporter, since
it needs access to many of its implementation details anyway. The
DWARFImporterDelegate is just another mechanism for deserializing
Clang ASTs and once we have a Clang AST, the processing is effectively
the same.
@adrian-prantl adrian-prantl changed the title [WIP] Move DWARFImporterDelegate into ClangImporter and remove DWARFImporter. Move DWARFImporterDelegate into ClangImporter and remove DWARFImporter. Aug 14, 2019
@adrian-prantl
Copy link
Contributor Author

This is good to go now.

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#1884
@swift-ci smoke test

if (!swift::ModuleDecl::matchesAccessPath(accessPath, name))
return;

if (lookupKind != NLKind::QualifiedLookup)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something I meant to ask: What does an unqualified lookup mean in this function?Based on the name I would expect an unqualified lookup to also take some form of context that the unqualified name is relative to, but I don't see that (or is that the access path?). Does this mean something different?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about how the lookup was originally written: was it Module.Foo, or just Foo and we haven't found anything in the current module? The only real reason we have it is so that the magic Builtin module can refuse to provide results for unqualified lookup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants