[SourceKit] Implement a new SourceKit request to generate the interface for a given type. rdar://27306890 (#3586)

This patch allows SourceKit to generate the interface for a given type specified by its mangled name.
Type interface is refined decl printing with type parameters localized and unusable members hidden.

Required field:
   "key.request": "source.request.editor.open.interface.swifttype"
   "key.usr": the mangled name of the given type.
This commit is contained in:
Xi Ge
2016-07-18 18:05:47 -07:00
committed by GitHub
parent 53a3a65d2c
commit 2a860100a5
10 changed files with 245 additions and 23 deletions

View File

@@ -42,6 +42,11 @@ public:
bool SynthesizedExtensions,
Optional<StringRef> InterestedUSR);
static SwiftInterfaceGenContextRef
createForTypeInterface(swift::CompilerInvocation Invocation,
StringRef TypeUSR,
std::string &ErrorMsg);
static SwiftInterfaceGenContextRef createForSwiftSource(StringRef DocumentName,
StringRef SourceFileName,
ASTUnitRef AstUnit,