Browse Source

Pass the library to the pass build and pass it to each added pass.

pull/1/head
triton 13 years ago
parent
commit
2e8fbe7452
  1. 7
      src/Generator/PassBuilder.cs

7
src/Generator/PassBuilder.cs

@ -11,15 +11,18 @@ namespace Cxxi @@ -11,15 +11,18 @@ namespace Cxxi
/// </summary>
public class PassBuilder
{
public List<TranslationUnitPass> Passes { get; set; }
public List<TranslationUnitPass> Passes { get; private set; }
public Library Library { get; private set; }
public PassBuilder()
public PassBuilder(Library library)
{
Passes = new List<TranslationUnitPass>();
Library = library;
}
public void AddPass(TranslationUnitPass pass)
{
pass.Library = Library;
Passes.Add(pass);
}

Loading…
Cancel
Save