Skip to content

Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager #15135

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

Conversation

nathawes
Copy link
Contributor

SourceKit doesn't use them and if any unrecognised LLVM options are passed to llvm::cl::ParseCommandLineOptions() it calls exit(), bringing down SourceKit.

Also use fprintf in Logging.cpp instead of llvm::errs() which uses a global C++ object that had already been destructed when logging the above failure.

Resolves rdar://problem/38314383

…eKit's ASTManager

SourceKit doesn't use them and if any unrecognised LLVM options are
passed to llvm::cl::ParseCommandLineOptions() it calls exit(), bringing
down SourceKit.

Also use fprintf instead of llvm::errs() in Logging.cpp as it uses a
global C++ object that had already been destructed when logging the
above failure.

Resolves rdar://problem/38314383
@nathawes nathawes force-pushed the rdar38314383-ignore-llvm-args-for-sourcekit-ast-manager-invocation branch from 90d28c3 to 17a6ef5 Compare March 10, 2018 02:57
@nathawes
Copy link
Contributor Author

@swift-ci please test and merge

@nathawes
Copy link
Contributor Author

@swift-ci please test linux

@nathawes nathawes merged commit 9746a28 into swiftlang:master Mar 13, 2018
@nathawes nathawes deleted the rdar38314383-ignore-llvm-args-for-sourcekit-ast-manager-invocation branch March 13, 2018 21:40
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.

1 participant