Skip to content

[lldb/SwiftUserExpression] Simplify ScanContext logic #1180

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 3 commits into from
May 6, 2020

Conversation

vedantk
Copy link

@vedantk vedantk commented May 5, 2020

  • Remove redundant null checks
  • Add missing logging information
  • Avoid re-computing the type of self and its type flags

@vedantk
Copy link
Author

vedantk commented May 5, 2020

@swift-ci test

vedantk added 2 commits May 5, 2020 16:25
Allow Language() to be called from const methods within UserExpression.

(cherry picked from commit 9e35498)
- Remove redundant null checks
- Add missing logging information
- Avoid re-computing the type of self and its type flags
@vedantk
Copy link
Author

vedantk commented May 5, 2020

@swift-ci test

@vedantk
Copy link
Author

vedantk commented May 5, 2020

cc @adrian-prantl

if (sym_ctx.comp_unit && (expr.Language() == lldb::eLanguageTypeUnknown ||
expr.Language() == lldb::eLanguageTypeSwift)) {
if (sym_ctx.comp_unit->GetLanguage() == lldb::eLanguageTypeSwift ||
sym_ctx.comp_unit->GetLanguage() == lldb::eLanguageTypePLI)

Choose a reason for hiding this comment

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

We should really remove the PL1 line. This dates back to a brief period in 2013 before DW_LANG_Swift was defined and before DW_LANG_APPLE_Swift could be defined due to upstream LLVM contstraints.

@vedantk
Copy link
Author

vedantk commented May 6, 2020

@swift-ci test

@vedantk vedantk merged commit 6429041 into swiftlang:swift/master May 6, 2020
@vedantk vedantk deleted the simplify-sue branch May 6, 2020 22:07
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