From b060168ec05689e4a8ccf790c0770bd2c4376194 Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Wed, 14 Aug 2019 16:15:05 -0400 Subject: Remove stack trace trimming in Elaborate phase Signed-off-by: Schuyler Eldridge --- .../scala/chisel3/stage/phases/Elaborate.scala | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/main/scala/chisel3/stage/phases/Elaborate.scala b/src/main/scala/chisel3/stage/phases/Elaborate.scala index 150eacbe..0f92c480 100644 --- a/src/main/scala/chisel3/stage/phases/Elaborate.scala +++ b/src/main/scala/chisel3/stage/phases/Elaborate.scala @@ -15,28 +15,9 @@ import firrtl.options.{OptionsException, Phase, PreservesAll} */ class Elaborate extends Phase with PreservesAll[Phase] { - /** - * @todo Change this to print to STDERR (`Console.err.println`) - */ def transform(annotations: AnnotationSeq): AnnotationSeq = annotations.flatMap { - case a: ChiselGeneratorAnnotation => - try { - a.elaborate - } catch { - case e: OptionsException => throw e - case e: ChiselException => - val copts = view[ChiselOptions](annotations) - val stackTrace = if (!copts.printFullStackTrace) { - e.chiselStackTrace - } else { - val s = new StringWriter - e.printStackTrace(new PrintWriter(s)) - s.toString - } - Predef.augmentString(stackTrace).lines.foreach(line => println(s"${ErrorLog.errTag} $line")) - Some(a) - } - case a => Some(a) + case a: ChiselGeneratorAnnotation => a.elaborate + case a => Some(a) } } -- cgit v1.2.3