You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`SwiftLanguage::GetDeclPrintingHelper` is a helper function used for Swift types. This
code contains some very similar logic to the default logic in `ValueObjectPrinter`.
Specifically:
`SwiftLanguage`:
```c++
else if (!options.m_hide_name)
stream.Printf(" =");
```
`ValueObjectPrinter`:
```c++
else if (ShouldShowName())
m_stream->Printf(" =");
```
The function `ValueObjectPrinter::ShouldShowName` is not accessible by `SwiftLanguage`.
To allow `SwiftLanguage` to make the right decision, and fit within the existing API
boundary, this change uses a custom print options, which sets calls `SetHideName`
according to the value of `ShouldShowName()`. This allows the Swift language decl
printing helper to correctly know whether to print the name, or not.
0 commit comments