aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJack Koenig2017-06-13 10:42:20 -0700
committerJack Koenig2017-06-13 16:01:52 -0700
commit6bd6f3b014acee01d2f8fa823776d586646083d0 (patch)
treefd2388ee734c4fc7674667fc5b42d97b0a8fdb00 /src
parent51fb6db4fc82aba80650f6e98267b34fcea14122 (diff)
Canonicalize spacing in RemoveValidIf
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/passes/RemoveValidIf.scala32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/main/scala/firrtl/passes/RemoveValidIf.scala b/src/main/scala/firrtl/passes/RemoveValidIf.scala
index 865143a5..9405c0f5 100644
--- a/src/main/scala/firrtl/passes/RemoveValidIf.scala
+++ b/src/main/scala/firrtl/passes/RemoveValidIf.scala
@@ -7,22 +7,22 @@ import firrtl.ir._
// Removes ValidIf as an optimization
object RemoveValidIf extends Pass {
- // Recursive. Removes ValidIf's
- private def onExp(e: Expression): Expression = {
- e map onExp match {
- case ValidIf(cond, value, tpe) => value
- case x => x
- }
- }
- // Recursive.
- private def onStmt(s: Statement): Statement = s map onStmt map onExp
+ // Recursive. Removes ValidIf's
+ private def onExp(e: Expression): Expression = {
+ e map onExp match {
+ case ValidIf(cond, value, tpe) => value
+ case x => x
+ }
+ }
+ // Recursive.
+ private def onStmt(s: Statement): Statement = s map onStmt map onExp
- private def onModule(m: DefModule): DefModule = {
- m match {
- case m: Module => Module(m.info, m.name, m.ports, onStmt(m.body))
- case m: ExtModule => m
- }
- }
+ private def onModule(m: DefModule): DefModule = {
+ m match {
+ case m: Module => Module(m.info, m.name, m.ports, onStmt(m.body))
+ case m: ExtModule => m
+ }
+ }
- def run(c: Circuit): Circuit = Circuit(c.info, c.modules.map(onModule), c.main)
+ def run(c: Circuit): Circuit = Circuit(c.info, c.modules.map(onModule), c.main)
}