Browse Source

Use the complete version of the declaration when generating forward references in the CLI source files.

pull/1/head
triton 13 years ago
parent
commit
f73213e73e
  1. 7
      src/Generator/Generators/CLI/CLISourcesTemplate.cs

7
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -31,8 +31,13 @@ namespace Cxxi.Generators.CLI
var includes = new HashSet<string>(); var includes = new HashSet<string>();
// Generate the forward references. // Generate the forward references.
foreach (var decl in Module.ForwardReferences) foreach (var forwardRef in Module.ForwardReferences)
{ {
var decl = forwardRef;
if (decl.IsIncomplete && decl.CompleteDeclaration != null)
decl = decl.CompleteDeclaration;
var @namespace = decl.Namespace; var @namespace = decl.Namespace;
var unit = @namespace.TranslationUnit; var unit = @namespace.TranslationUnit;

Loading…
Cancel
Save