Commit Graph

9 Commits

Author SHA1 Message Date
Ben Barham
d829fcf2eb Merge exported modules with the same public name in generated interface
If a module has the same `public-module-name` as the module being
generated and its import is exported, merge it into the same generated
interface.

Fix various always-imported modules from being printed while here and
update all the tests that checked for them.

Resolves rdar://137887712.

(cherry picked from commit ddddc667c8)
2025-05-02 12:52:44 -07:00
Konrad `ktoso` Malawski
7d1ce789ad Revert "Revert "Isolated synchronous deinit"" 2024-09-17 17:35:38 +09:00
Alex Hoppen
c5aa49ba64 Revert "Isolated synchronous deinit" 2024-09-03 18:11:26 -07:00
Mykola Pokhylets
9dcea15d21 Fixed tests on Linux, Windows and older MacOS versions 2024-07-11 13:09:07 +02:00
Mykola Pokhylets
62dbc6c966 Fixed some tests. Using extract_executor SIL instruction instead of custom code. 2024-07-11 13:09:06 +02:00
Ben Barham
46d12f8b51 [InterfaceGen] Print @discardableResult in generated interfaces
Resolves rdar://58805969.
2022-11-11 18:15:35 -08:00
Rintaro Ishizaki
8bda524cd2 [SourceKit] Update for primary associated types
* InterfaceGen reports a primary associated type as a reference to the
  'associatedtype' declaration
* CursorInfo on a primary associated type returns information of the
  'associatedtype' declaration

rdar://93275458
2022-05-18 17:16:49 -07:00
Nathan Hawes
2420b6d28b [SourceKit] Don't report the ObjC runtime name without @objc(Name)
We used to compute the mangled name in other cases, but document structure is
a syntactic request and can't guarantee that the class/protocol we're getting
the mangled name of is valid in any way so it often breaks assumptions in the
mangler and causes it to crash. It's not clear if the runtime_name is actually
being used anymore, so this change restricts reporting it to just the cases
where we don't need to mangle.

rdar://problem/40956377
2020-02-14 11:40:09 -08:00
Nathan Hawes
d164c616b4 [ParseableInterface][sourcekitd] Set the DetailedPreprocessorRecord ClangImporter option on the sub invocation if it's set on the parent
In addition to capturing more detailed preprocessor info, the
DetailedPreprocessorRecord option sets the clang module format to 'raw'
rather than the default 'object'. Sourcekitd doesn't link the code
generation libs, which it looks like the default 'object' format requires,
so it sets this option to true. The subinvocation generated when loading a
module from a .swiftinterface file still used the default prior to this
change though, so it would end up crashing sourcekitd.

This change sets the DetailedProccessorRecord option if the DetailedRecord
option is set on the preprocessor options of parent context's clang module
loader. This fixes interface generation crashing for modules that only have
a .swiftinterface file.

rdar://problem/43906499
2019-02-13 14:13:25 -08:00