You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a generator which contains data usable in my custom passes.
Wouldn't be optimal to pass a Generator to the TranslationUnitPass instead of a BindingContext.
Otherwise I am only able to share data via the DriverOptions and since the data is computed/modified by previous passes, it does not really fit in options.
I am not implying refactoring, but it should be a cleaner way to allow each generator to have its own data/options etc...
The text was updated successfully, but these errors were encountered:
Wouldn't be optimal to pass a Generator to the TranslationUnitPass instead of a BindingContext.
This could work, not sure if I would say its optimal though, as it's better IMHO for passes to try to be as generator-independent as possible. Most passes do not need a reference to the generator.
But there should be a way to do what you need, I was thinking maybe we could add the current generator to BindingContext.
Or maybe add a new GeneratorSpecificPass that can get a Generator property automatically set before running it?
You think either of those could be a good enough solution?
I am working on a generator which contains data usable in my custom passes.
Wouldn't be optimal to pass a
Generator
to theTranslationUnitPass
instead of aBindingContext
.Otherwise I am only able to share data via the
DriverOptions
and since the data is computed/modified by previous passes, it does not really fit in options.I am not implying refactoring, but it should be a cleaner way to allow each generator to have its own data/options etc...
The text was updated successfully, but these errors were encountered: