mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IDE][DocSupport] Fix DocInfo missing decls when generated for clang submodules.
Out handling of clang submodules was handled differently between DocInfo and InterfaceGen. For InterfaceGen submodules were mapped back to their top-level clang modules (or their Swift overlay if it had one) before being passed into printSubmoduleInterface, along with the dot separated name of the submodule. For DocInfo, they were not, and only the rightmost component of their name was passed. The call to retrieve the decls from a ModuleDecl doesn't work if the ModuleDecl wraps a clang submodule, so we were missing these decls. InterfaceGen for submodules also shouldn't have been mapping the module back to the overlay of top-level clang module, as that meant we ended up printing import decls from the Swift overlay in the submodule's interface. Resolves rdar://problem/57338105
This commit is contained in:
@@ -54,19 +54,11 @@ bool printTypeInterface(ModuleDecl *M, Type Ty, ASTPrinter &Printer,
|
||||
bool printTypeInterface(ModuleDecl *M, StringRef TypeUSR, ASTPrinter &Printer,
|
||||
std::string &TypeName, std::string &Error);
|
||||
|
||||
void printModuleInterface(ModuleDecl *M, Optional<StringRef> Group,
|
||||
void printModuleInterface(ModuleDecl *M, ArrayRef<StringRef> GroupNames,
|
||||
ModuleTraversalOptions TraversalOptions,
|
||||
ASTPrinter &Printer, const PrintOptions &Options,
|
||||
const bool PrintSynthesizedExtensions);
|
||||
|
||||
// FIXME: this API should go away when Swift can represent Clang submodules as
|
||||
// 'swift::ModuleDecl *' objects.
|
||||
void printSubmoduleInterface(ModuleDecl *M, ArrayRef<StringRef> FullModuleName,
|
||||
ArrayRef<StringRef> GroupNames,
|
||||
ModuleTraversalOptions TraversalOptions,
|
||||
ASTPrinter &Printer, const PrintOptions &Options,
|
||||
const bool PrintSynthesizedExtensions);
|
||||
|
||||
/// Print the interface for a header that has been imported via the implicit
|
||||
/// objc header importing feature.
|
||||
void printHeaderInterface(StringRef Filename, ASTContext &Ctx,
|
||||
|
||||
Reference in New Issue
Block a user