Run scalafmt after scala version update

This commit is contained in:
Tynan McAuley
2023-02-22 22:05:31 -08:00
parent 4e398da790
commit 20587cfd40
3 changed files with 12 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ class ExtraLowTransforms extends Transform with DependencyAPIMigration {
// this PropagatePresetAnnotations is needed to run the RemoveValidIf pass (that is removed from CIRCT).
// additionally, since that pass isn't explicitly a prereq of the LowFormEmitter it
// needs to wrapped in this xform
override def prerequisites: Seq[TransformDependency] = Forms.LowForm :+
override def prerequisites: Seq[TransformDependency] = Forms.LowForm :+
Dependency[firrtl.transforms.PropagatePresetAnnotations]
override def optionalPrerequisites: Seq[TransformDependency] = Forms.LowFormOptimized
override def optionalPrerequisiteOf: Seq[TransformDependency] = Forms.LowEmitters

View File

@@ -36,13 +36,16 @@ private class GenerateModelStageMain(annotations: AnnotationSeq) extends LazyLog
}
def executeStageMain(): Unit = {
val appendedAnnotations = annotations.filter(_ match {
case CompilerNameAnnotation(_) => true
case _ => false
}).map(_ match {
case CompilerNameAnnotation("low") => Some(RunFirrtlTransformAnnotation(Dependency[ExtraLowTransforms]))
case _ => None
}).flatten
val appendedAnnotations = annotations
.filter(_ match {
case CompilerNameAnnotation(_) => true
case _ => false
})
.map(_ match {
case CompilerNameAnnotation("low") => Some(RunFirrtlTransformAnnotation(Dependency[ExtraLowTransforms]))
case _ => None
})
.flatten
val annos = new FirrtlStage().execute(Array.empty, annotations ++ appendedAnnotations)
annos.collectFirst { case FirrtlCircuitAnnotation(circuit) => circuit } match {

View File

@@ -38,8 +38,7 @@ object DuplicateCompilerAnnotation extends HasShellOptions {
longOption = "duplicate-compiler",
shortOption = Some("DX"),
toAnnotationSeq = (s: String) => {
Seq(
CompilerNameAnnotation(s))
Seq(CompilerNameAnnotation(s))
},
helpText = "duplicate-compiler",
helpValueName = Some("same as --compiler FIRRTL flag")