aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala')
-rw-r--r--src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala b/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
index 61045c00..4a253740 100644
--- a/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
+++ b/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
@@ -5,7 +5,6 @@ package firrtl.transforms
import java.io.{File, FileNotFoundException, FileInputStream, FileOutputStream, PrintWriter}
import firrtl._
-import firrtl.Utils.throwInternalError
import firrtl.annotations._
import scala.collection.immutable.ListSet
@@ -144,7 +143,7 @@ object BlackBoxSourceHelper {
* @param file the file to write it into
* @throws BlackBoxNotFoundException if the requested resource does not exist
*/
- def copyResourceToFile(name: String, file: File) {
+ def copyResourceToFile(name: String, file: File): Unit = {
val in = getClass.getResourceAsStream(name)
val out = new FileOutputStream(file)
safeFile(name)(Iterator.continually(in.read).takeWhile(-1 != _).foreach(out.write))
@@ -153,7 +152,7 @@ object BlackBoxSourceHelper {
val fileListName = "firrtl_black_box_resource_files.f"
- def writeFileList(files: ListSet[File], targetDir: File) {
+ def writeFileList(files: ListSet[File], targetDir: File): Unit = {
if (files.nonEmpty) {
// We need the canonical path here, so verilator will create a path to the file that works from the targetDir,
// and, so we can compare the list of files automatically included, with an explicit list provided by the client
@@ -165,7 +164,7 @@ object BlackBoxSourceHelper {
}
}
- def writeTextToFile(text: String, file: File) {
+ def writeTextToFile(text: String, file: File): Unit = {
val out = new PrintWriter(file)
out.write(text)
out.close()