aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2020-10-13 16:33:27 -0400
committerGitHub2020-10-13 20:33:27 +0000
commita5a8c7a8f5d1dd38ac3452d7c98ac7773f692304 (patch)
tree6de654d0449f9dc1dd426ee8e285edb2bc5a8172 /src
parent8f1accb633a265a01d6c92fe20aa4e513350312c (diff)
Make {Stage, FirrtlStage}.run protected (#1926)
* Make Stage.run protected Change the access modifier of Stage.run from no modifier to protected. This method is really an internal API that the user implements with the main entry point for a Stage being "execute" or "transform". By allowing users to access "run" they can bypass checks, mandatory file reads/writes, and wrappers. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> * Make FirrtlStage.run protected Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/options/Stage.scala2
-rw-r--r--src/main/scala/firrtl/stage/FirrtlStage.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/options/Stage.scala b/src/main/scala/firrtl/options/Stage.scala
index 8e2c11d1..0783bfb5 100644
--- a/src/main/scala/firrtl/options/Stage.scala
+++ b/src/main/scala/firrtl/options/Stage.scala
@@ -23,7 +23,7 @@ abstract class Stage extends Phase {
* @param annotations input annotations
* @return output annotations
*/
- def run(annotations: AnnotationSeq): AnnotationSeq
+ protected def run(annotations: AnnotationSeq): AnnotationSeq
/** Execute this stage on some input annotations. Annotations will be read from any input annotation files.
* @param annotations input annotations
diff --git a/src/main/scala/firrtl/stage/FirrtlStage.scala b/src/main/scala/firrtl/stage/FirrtlStage.scala
index 0b1e6578..cfdd21e6 100644
--- a/src/main/scala/firrtl/stage/FirrtlStage.scala
+++ b/src/main/scala/firrtl/stage/FirrtlStage.scala
@@ -35,7 +35,7 @@ class FirrtlStage extends Stage {
val shell: Shell = new Shell("firrtl") with FirrtlCli
- def run(annotations: AnnotationSeq): AnnotationSeq = phase.transform(annotations)
+ override protected def run(annotations: AnnotationSeq): AnnotationSeq = phase.transform(annotations)
}