Skip to content

Commit 233f00c

Browse files
committed
[sourcekitd] Fix linux build
1 parent a58d923 commit 233f00c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-InProc.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,13 @@ bool RequestDict::getInt64(SourceKit::UIdent Key, int64_t &Val,
760760
return false;
761761
}
762762

763+
Optional<int64_t> RequestDict::getOptionalInt64(SourceKit::UIdent Key) {
764+
auto Object = static_cast<SKDObject *>(Dict)->get(SKDUIDFromUIdent(Key));
765+
if (!Object)
766+
return None;
767+
return Object->getInt64().getValueOr(0);
768+
}
769+
763770
sourcekitd_response_t
764771
sourcekitd::createErrorRequestInvalid(const char *Description) {
765772
return retained(new SKDError(SOURCEKITD_ERROR_REQUEST_INVALID,

0 commit comments

Comments
 (0)