diff options
| author | Schuyler Eldridge | 2019-04-22 21:20:08 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-04-25 16:24:15 -0400 |
| commit | ef8f06f23b9ee6cf86de2450752dfd0fcd32da80 (patch) | |
| tree | 79e2e8c5753903ca6d14e9b952c26a07442bd980 /src/main/scala/firrtl/options/Phase.scala | |
| parent | 47fe781c4ace38dff7f31da7e78f772e131d689e (diff) | |
Add ShellOption, DeletedWrapper
Abstracts away option writing such that users no longer have to
understand scopt semantics. This adds a ShellOption class and a
HasShellOptions trait for something which provides one or more
ShellOptions. This refactors the FIRRTL codebase to use this style of
option specification.
Adds and uses DeletedWrapper to automatically generate
DeletedAnnotations.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/firrtl/options/Phase.scala')
| -rw-r--r-- | src/main/scala/firrtl/options/Phase.scala | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/main/scala/firrtl/options/Phase.scala b/src/main/scala/firrtl/options/Phase.scala index a660d08a..34739053 100644 --- a/src/main/scala/firrtl/options/Phase.scala +++ b/src/main/scala/firrtl/options/Phase.scala @@ -39,22 +39,6 @@ abstract class Phase extends TransformLike[AnnotationSeq] { */ lazy val name: String = this.getClass.getName - /** Perform the transform of [[transform]] on an [[firrtl.AnnotationSeq AnnotationSeq]] and add - * [[firrtl.annotations.DeletedAnnotation DeletedAnnotation]]s for any deleted [[firrtl.annotations.Annotation - * Annotation]]s. - * @param a - */ - final def runTransform(annotations: AnnotationSeq): AnnotationSeq = { - val ax = transform(annotations) - - val (in, out) = (mutable.LinkedHashSet() ++ annotations, mutable.LinkedHashSet() ++ ax) - - (in -- out).map { - case DeletedAnnotation(n, a) => DeletedAnnotation(s"$n+$name", a) - case a => DeletedAnnotation(name, a) - }.toSeq ++ ax - } - } /** A [[TransformLike]] that internally ''translates'' the input type to some other type, transforms the internal type, |
