Emit mangled names for public symbols into the .swiftinterface

When the frontend option `-abi-comments-in-module-interface` is provided
during interface printing, the printed interface will contain
additional comments that provide the mangled names for public symbols.
This is an experiment in seeing how much information we can
meaningfully extract from a printed Swift interface for the purpose of
bridging with other languages.
This commit is contained in:
Doug Gregor
2024-09-19 23:46:54 -07:00
parent 77ed014690
commit 0aff85ced7
7 changed files with 108 additions and 14 deletions

View File

@@ -914,7 +914,7 @@ bool swift::emitSwiftInterface(raw_ostream &out,
M, Opts.PreserveTypesAsWritten, Opts.PrintFullConvention,
Opts.InterfaceContentMode,
useExportedModuleNames,
Opts.AliasModuleNames, &aliasModuleNamesTargets);
Opts.AliasModuleNames, &aliasModuleNamesTargets, Opts.ABIComments);
InheritedProtocolCollector::PerTypeMap inheritedProtocolMap;
SmallVector<Decl *, 16> topLevelDecls;