-
Notifications
You must be signed in to change notification settings - Fork 10.5k
add default values for SymbolGraphOptions #59037
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
add default values for SymbolGraphOptions #59037
Conversation
@swift-ci Please build toolchain macOS |
f682cc6
to
b42b0ed
Compare
@swift-ci Please test |
StringRef OutputDir = StringRef{}; | ||
|
||
/// The target of the module. | ||
llvm::Triple Target; | ||
llvm::Triple Target = llvm::Triple{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are default initialized already, but providing it doesn't hurt. You could just do = {};
if you want to keep though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm being extra paranoid now, since i was assuming that bool
had a default initialization as well. 😅 I can clean up the initializer value, though. Thanks for the tip!
@swift-ci Please test |
Resolves rdar://93780666
Currently, the
IncludeClangDocs
field ofSymbolGraphOptions
is uninitialized when generating a symbol graph during a build. The assumption behind this field is that the branches that it gates would only be run when generating a symbol graph from SourceKit. However, we've noticed a situation where the symbol graph is emitting the partial "location" field during a build on ARM macOS. This PR adds defaults to theSymbolGraphOptions
struct, as well as manually setting theIncludeClangDocs
field tofalse
when building, to ensure that this code path is never hit during a regular compile.