diff options
| author | Schuyler Eldridge | 2019-04-18 23:52:13 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-07-03 19:59:51 -0400 |
| commit | 01fb87e1f8b1f9408827655e944036a9bcf76fd9 (patch) | |
| tree | 5ecc55cbf533652137728a71220b1a921a893f8d /src | |
| parent | ec3734e8d48cc429804f08e92c5ff0d2c2da3b99 (diff) | |
Make Transform extend TransformLike
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/Compiler.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala index c01564d2..b72fd4ce 100644 --- a/src/main/scala/firrtl/Compiler.scala +++ b/src/main/scala/firrtl/Compiler.scala @@ -11,7 +11,7 @@ import firrtl.annotations._ import firrtl.ir.Circuit import firrtl.Utils.throwInternalError import firrtl.annotations.transforms.{EliminateTargetPaths, ResolvePaths} -import firrtl.options.StageUtils +import firrtl.options.{StageUtils, TransformLike} /** Container of all annotations for a Firrtl compiler */ class AnnotationSeq private (private[firrtl] val underlying: List[Annotation]) { @@ -169,7 +169,7 @@ final case object UnknownForm extends CircuitForm(-1) { // scalastyle:on magic.number /** The basic unit of operating on a Firrtl AST */ -abstract class Transform extends LazyLogging { +abstract class Transform extends TransformLike[CircuitState] { /** A convenience function useful for debugging and error messages */ def name: String = this.getClass.getSimpleName /** The [[firrtl.CircuitForm]] that this transform requires to operate on */ @@ -185,6 +185,8 @@ abstract class Transform extends LazyLogging { */ protected def execute(state: CircuitState): CircuitState + def transform(state: CircuitState): CircuitState = execute(state) + /** Convenience method to get annotations relevant to this Transform * * @param state The [[CircuitState]] form which to extract annotations |
