Skip to content

Commit 0c0c4be

Browse files
committed
Add set of generated declarations to CLITypeReferences.
1 parent aff13e4 commit 0c0c4be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Generator/Generators/CLI/CLITypeReferences.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ public IEnumerable<CLITypeReference> TypeReferences
3636
get { return typeReferences.Values; }
3737
}
3838

39+
public HashSet<Declaration> GeneratedDeclarations;
40+
3941
public CLITypeReferenceCollector(ITypeMapDatabase typeMapDatabase, DriverOptions driverOptions)
4042
{
4143
TypeMapDatabase = typeMapDatabase;
4244
DriverOptions = driverOptions;
4345
typeReferences = new Dictionary<Declaration, CLITypeReference>();
46+
GeneratedDeclarations = new HashSet<Declaration>();
4447
}
4548

4649
public CLITypeReference GetTypeReference(Declaration decl)
@@ -194,6 +197,9 @@ public override bool VisitClassDecl(Class @class)
194197
if (@class.IsIncomplete && @class.CompleteDeclaration != null)
195198
@class = (Class) @class.CompleteDeclaration;
196199

200+
if (@class.TranslationUnit == TranslationUnit)
201+
GeneratedDeclarations.Add(@class);
202+
197203
string keywords;
198204
if (DriverOptions.IsCLIGenerator)
199205
keywords = @class.IsValueType ? "value struct" : "ref class";

0 commit comments

Comments
 (0)