summaryrefslogtreecommitdiff
path: root/coreMacros/src/main/scala/chisel3/internal/sourceinfo
diff options
context:
space:
mode:
Diffstat (limited to 'coreMacros/src/main/scala/chisel3/internal/sourceinfo')
-rw-r--r--coreMacros/src/main/scala/chisel3/internal/sourceinfo/NamingAnnotations.scala4
-rw-r--r--coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala20
2 files changed, 22 insertions, 2 deletions
diff --git a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/NamingAnnotations.scala b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/NamingAnnotations.scala
index 952e9f91..29b27b9e 100644
--- a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/NamingAnnotations.scala
+++ b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/NamingAnnotations.scala
@@ -17,6 +17,8 @@ import scala.language.experimental.macros
import scala.annotation.StaticAnnotation
import scala.annotation.compileTimeOnly
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object DebugTransforms
class DebugTransforms(val c: Context) {
import c.universe._
@@ -45,6 +47,8 @@ class DebugTransforms(val c: Context) {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object NamingTransforms
class NamingTransforms(val c: Context) {
import c.universe._
import Flag._
diff --git a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
index 9f3ac88d..aa474cb6 100644
--- a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
+++ b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
@@ -27,6 +27,8 @@ trait SourceInfoTransformMacro {
def implicitCompileOptions = q"implicitly[_root_.chisel3.core.CompileOptions]"
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object UIntTransform
class UIntTransform(val c: Context) extends SourceInfoTransformMacro {
import c.universe._
def bitset(off: c.Tree, dat: c.Tree): c.Tree = {
@@ -34,6 +36,8 @@ class UIntTransform(val c: Context) extends SourceInfoTransformMacro {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object InstTransform
// Module instantiation transform
class InstTransform(val c: Context) extends SourceInfoTransformMacro {
import c.universe._
@@ -42,6 +46,8 @@ class InstTransform(val c: Context) extends SourceInfoTransformMacro {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object MemTransform
class MemTransform(val c: Context) extends SourceInfoTransformMacro {
import c.universe._
def apply[T: c.WeakTypeTag](size: c.Tree, t: c.Tree): c.Tree = {
@@ -49,6 +55,8 @@ class MemTransform(val c: Context) extends SourceInfoTransformMacro {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object MuxTransform
class MuxTransform(val c: Context) extends SourceInfoTransformMacro {
import c.universe._
def apply[T: c.WeakTypeTag](cond: c.Tree, con: c.Tree, alt: c.Tree): c.Tree = {
@@ -57,6 +65,8 @@ class MuxTransform(val c: Context) extends SourceInfoTransformMacro {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object VecTransform
class VecTransform(val c: Context) extends SourceInfoTransformMacro {
import c.universe._
def apply_elts(elts: c.Tree): c.Tree = {
@@ -93,6 +103,8 @@ abstract class AutoSourceTransform extends SourceInfoTransformMacro {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object SourceInfoTransform
class SourceInfoTransform(val c: Context) extends AutoSourceTransform {
import c.universe._
@@ -129,6 +141,8 @@ class SourceInfoTransform(val c: Context) extends AutoSourceTransform {
}
}
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object CompileOptionsTransform
class CompileOptionsTransform(val c: Context) extends AutoSourceTransform {
import c.universe._
@@ -145,8 +159,10 @@ class CompileOptionsTransform(val c: Context) extends AutoSourceTransform {
}
}
-/** Special whitebox version of the blackbox SourceInfoTransform, used when fun things need to happen to satisfy the
- * type system while preventing the use of macro overrides.
+// Workaround for https://github.com/sbt/sbt/issues/3966
+object SourceInfoWhiteboxTransform
+/** Special whitebox version of the blackbox SourceInfoTransform, used when fun things need to
+ * happen to satisfy the type system while preventing the use of macro overrides.
*/
class SourceInfoWhiteboxTransform(val c: whitebox.Context) extends AutoSourceTransform {
import c.universe._