summaryrefslogtreecommitdiff
path: root/macros/src/main/scala/chisel3/internal/sourceinfo
diff options
context:
space:
mode:
authorJack2021-12-18 08:27:38 +0000
committerJack2021-12-18 08:27:38 +0000
commitdd9ad534771247ac16eaa47eb9794102736b5102 (patch)
treed4566d317cb8526b79017de1e438aea8217dd1d4 /macros/src/main/scala/chisel3/internal/sourceinfo
parent440edc4436fb3a8a4175ae425a0d31c4997ee60f (diff)
parentf50f74f583fba7b98e550c440df091e559ce32b8 (diff)
Merge branch 'master' into 3.5-release
Diffstat (limited to 'macros/src/main/scala/chisel3/internal/sourceinfo')
-rw-r--r--macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala14
1 files changed, 12 insertions, 2 deletions
diff --git a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
index a8a7e8d5..ac3e236c 100644
--- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
@@ -165,7 +165,12 @@ object SourceInfoTransform
class SourceInfoTransform(val c: Context) extends AutoSourceTransform {
import c.universe._
- def noArg(): c.Tree = {
+ def noArg: c.Tree = {
+ q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)"
+ }
+
+ /** Necessary for dummy methods to auto-apply their arguments to this macro */
+ def noArgDummy(dummy: c.Tree*): c.Tree = {
q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)"
}
@@ -224,7 +229,12 @@ object SourceInfoWhiteboxTransform
class SourceInfoWhiteboxTransform(val c: whitebox.Context) extends AutoSourceTransform {
import c.universe._
- def noArg(): c.Tree = {
+ def noArg: c.Tree = {
+ q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)"
+ }
+
+ /** Necessary for dummy methods to auto-apply their arguments to this macro */
+ def noArgDummy(dummy: c.Tree*): c.Tree = {
q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)"
}