File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/Generator/Generators/CLI Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,14 @@ public IEnumerable<CLITypeReference> TypeReferences
36
36
get { return typeReferences . Values ; }
37
37
}
38
38
39
+ public HashSet < Declaration > GeneratedDeclarations ;
40
+
39
41
public CLITypeReferenceCollector ( ITypeMapDatabase typeMapDatabase , DriverOptions driverOptions )
40
42
{
41
43
TypeMapDatabase = typeMapDatabase ;
42
44
DriverOptions = driverOptions ;
43
45
typeReferences = new Dictionary < Declaration , CLITypeReference > ( ) ;
46
+ GeneratedDeclarations = new HashSet < Declaration > ( ) ;
44
47
}
45
48
46
49
public CLITypeReference GetTypeReference ( Declaration decl )
@@ -194,6 +197,9 @@ public override bool VisitClassDecl(Class @class)
194
197
if ( @class . IsIncomplete && @class . CompleteDeclaration != null )
195
198
@class = ( Class ) @class . CompleteDeclaration ;
196
199
200
+ if ( @class . TranslationUnit == TranslationUnit )
201
+ GeneratedDeclarations . Add ( @class ) ;
202
+
197
203
string keywords ;
198
204
if ( DriverOptions . IsCLIGenerator )
199
205
keywords = @class . IsValueType ? "value struct" : "ref class" ;
You can’t perform that action at this time.
0 commit comments