mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
RequestResult class and Pass*InfoForDecl fixes
This commit is contained in:
@@ -834,8 +834,7 @@ void SwiftLangSupport::editorOpenHeaderInterface(EditorConsumer &Consumer,
|
||||
|
||||
void SwiftLangSupport::findInterfaceDocument(StringRef ModuleName,
|
||||
ArrayRef<const char *> Args,
|
||||
std::function<void(const InterfaceDocInfo &,
|
||||
StringRef Error)> Receiver) {
|
||||
std::function<void(const RequestResult<InterfaceDocInfo> &)> Receiver) {
|
||||
InterfaceDocInfo Info;
|
||||
|
||||
CompilerInstance CI;
|
||||
@@ -847,7 +846,7 @@ void SwiftLangSupport::findInterfaceDocument(StringRef ModuleName,
|
||||
std::string Error;
|
||||
if (getASTManager()->initCompilerInvocation(Invocation, Args, CI.getDiags(),
|
||||
StringRef(), Error)) {
|
||||
return Receiver({}, Error);
|
||||
return Receiver(RequestResult<InterfaceDocInfo>::fromError(Error));
|
||||
}
|
||||
|
||||
if (auto IFaceGenRef = IFaceGenContexts.find(ModuleName, Invocation))
|
||||
@@ -905,5 +904,5 @@ void SwiftLangSupport::findInterfaceDocument(StringRef ModuleName,
|
||||
}
|
||||
Info.CompilerArgs = NewArgs;
|
||||
|
||||
return Receiver(Info, "");
|
||||
return Receiver(RequestResult<InterfaceDocInfo>::fromResult(Info));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user