File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1173,6 +1173,15 @@ class LoadedFile : public FileUnit {
1173
1173
1174
1174
virtual bool isSystemModule () const { return false ; }
1175
1175
1176
+ // / Retrieve the set of generic signatures stored within this module.
1177
+ // /
1178
+ // / \returns \c true if this module file supports retrieving all of the
1179
+ // / generic signatures, \c false otherwise.
1180
+ virtual bool getAllGenericSignatures (
1181
+ SmallVectorImpl<GenericSignature*> &genericSignatures) {
1182
+ return false ;
1183
+ }
1184
+
1176
1185
static bool classof (const FileUnit *file) {
1177
1186
return file->getKind () == FileUnitKind::SerializedAST ||
1178
1187
file->getKind () == FileUnitKind::ClangModule;
Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ class SerializedASTFile final : public LoadedFile {
195
195
196
196
virtual const clang::Module *getUnderlyingClangModule () const override ;
197
197
198
+ virtual bool getAllGenericSignatures (
199
+ SmallVectorImpl<GenericSignature*> &genericSignatures)
200
+ override ;
201
+
198
202
static bool classof (const FileUnit *file) {
199
203
return file->getKind () == FileUnitKind::SerializedAST;
200
204
}
Original file line number Diff line number Diff line change @@ -2175,6 +2175,17 @@ bool SerializedASTFile::hasEntryPoint() const {
2175
2175
return File.Bits .HasEntryPoint ;
2176
2176
}
2177
2177
2178
+ bool SerializedASTFile::getAllGenericSignatures (
2179
+ SmallVectorImpl<GenericSignature*> &genericSignatures) {
2180
+ genericSignatures.clear ();
2181
+ for (unsigned index : indices (File.GenericSignatures )) {
2182
+ if (auto genericSig = File.getGenericSignature (index + 1 ))
2183
+ genericSignatures.push_back (genericSig);
2184
+ }
2185
+
2186
+ return true ;
2187
+ }
2188
+
2178
2189
ClassDecl *SerializedASTFile::getMainClass () const {
2179
2190
assert (hasEntryPoint ());
2180
2191
return cast_or_null<ClassDecl>(File.getDecl (File.Bits .EntryPointDeclID ));
You can’t perform that action at this time.
0 commit comments