-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[clang] Do not share ownership of HeaderSearchOptions
#132984
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -269,9 +269,6 @@ class CompilerInvocation : public CompilerInvocationBase { | |
| /// @{ | ||
| using CompilerInvocationBase::LangOpts; | ||
| using CompilerInvocationBase::TargetOpts; | ||
| std::shared_ptr<HeaderSearchOptions> getHeaderSearchOptsPtr() { | ||
| return HSOpts; | ||
| } | ||
|
Comment on lines
-272
to
-274
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the primary goal of this PR. |
||
| std::shared_ptr<LangOptions> getLangOptsPtr() { return LangOpts; } | ||
| /// @} | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -569,7 +569,7 @@ CrossTranslationUnitContext::ASTLoader::loadFromDump(StringRef ASTDumpPath) { | |
| return ASTUnit::LoadFromASTFile( | ||
| ASTDumpPath, CI.getPCHContainerOperations()->getRawReader(), | ||
| ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(), | ||
| CI.getHeaderSearchOptsPtr()); | ||
| CI.getHeaderSearchOpts()); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Xazax-hun I think this change would mean that LoadFromASTFile would no longer modify the header search options on CI here. I'm not familiar with the CrossTU code; do you know if that is okay?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ping, and CC @gamesh411 too.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| /// Load the AST from a source-file, which is supposed to be located inside the | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() { | |
| /*ShouldOwnClient=*/true)); | ||
| std::unique_ptr<ASTUnit> Unit = ASTUnit::LoadFromASTFile( | ||
| ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, | ||
| CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr()); | ||
| CI.getFileSystemOpts(), CI.getHeaderSearchOpts()); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adrian-prantl I think this change would mean that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ping, and CC @zygoloid too. |
||
|
|
||
| if (!Unit) | ||
| continue; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.