aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2018-09-27 13:10:59 -0400
committerSchuyler Eldridge2018-10-03 14:47:54 -0400
commit5fdd0b5a96a589b50e15fb8c3e7045bc32ceb21f (patch)
treea8df34993d501638df62213ff484b15fc63e23c3 /src
parente98f8efcc4feb1c7a630bd2657f1a902216e6c40 (diff)
Make some Uniquify methods private [firrtl]
This makes findValidPrefix and enumerateNames both private to FIRRTL (previously, these were private). This enables their use for name generation by other FIRRTL passes/transforms. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/passes/Uniquify.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/passes/Uniquify.scala b/src/main/scala/firrtl/passes/Uniquify.scala
index 79954254..10d4e97f 100644
--- a/src/main/scala/firrtl/passes/Uniquify.scala
+++ b/src/main/scala/firrtl/passes/Uniquify.scala
@@ -45,7 +45,7 @@ object Uniquify extends Transform {
// We don't add an _ in the collision check because elts could be Seq("")
// In this case, we're just really checking if prefix itself collides
@tailrec
- private def findValidPrefix(
+ private [firrtl] def findValidPrefix(
prefix: String,
elts: Seq[String],
namespace: collection.mutable.HashSet[String]): String = {
@@ -59,7 +59,7 @@ object Uniquify extends Transform {
// eg. foo : { bar : { a, b }[2], c }
// => foo, foo bar, foo bar 0, foo bar 1, foo bar 0 a, foo bar 0 b,
// foo bar 1 a, foo bar 1 b, foo c
- private def enumerateNames(tpe: Type): Seq[Seq[String]] = tpe match {
+ private [firrtl] def enumerateNames(tpe: Type): Seq[Seq[String]] = tpe match {
case t: BundleType =>
t.fields flatMap { f =>
(enumerateNames(f.tpe) map (f.name +: _)) ++ Seq(Seq(f.name))