aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/firrtl/annotations/Annotation.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/annotations/Annotation.scala b/src/main/scala/firrtl/annotations/Annotation.scala
index b5c9c7e0..8722c4fa 100644
--- a/src/main/scala/firrtl/annotations/Annotation.scala
+++ b/src/main/scala/firrtl/annotations/Annotation.scala
@@ -48,6 +48,9 @@ trait NoTargetAnnotation extends Annotation {
trait SingleTargetAnnotation[T <: Named] extends Annotation {
val target: T
+ // we can implement getTargets more efficiently since we know that we have exactly one target
+ override def getTargets: Seq[Target] = Seq(target)
+
/** Create another instance of this Annotation */
def duplicate(n: T): Annotation