Skip to content

[lldb] Use GetASTContext() instead of accessing the ivar directly #10682

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

Open
wants to merge 1 commit into
base: stable/20240723
Choose a base branch
from

Conversation

augusto2112
Copy link

GetASTContext() returns a thread safe object. The SwiftASTContext class would require users of the class to use the function, but internally would access the underlying ivar directly. This patch makes sure all the accesses of the swift::ASTContext are done through the aforementioned function.

rdar://143542489

GetASTContext() returns a thread safe object. The SwiftASTContext class
would require users of the class to use the function, but internally
would access the underlying ivar directly. This patch makes sure all the
accesses of the swift::ASTContext are done through the aforementioned
function.

rdar://143542489
@augusto2112 augusto2112 requested a review from adrian-prantl May 14, 2025 17:27
@augusto2112 augusto2112 requested a review from a team as a code owner May 14, 2025 17:27
@augusto2112
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link

@augusto2112 Failing in the unittest:

 Initialized mock SwiftASTContext
[2025-05-14T20:31:34.568Z] Assertion failed: (m_initialized_search_path_options && m_initialized_clang_importer_options && "search path options must be initialized before ClangImporter"), function GetASTContext, file SwiftASTContext.cpp, line 3642.

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