From d35248c8efc8c7afb1b99ddea631be5e6537d46d Mon Sep 17 00:00:00 2001 From: Kevin Laeufer Date: Fri, 21 May 2021 12:58:02 -0700 Subject: Annotation: override getTargets for SingleTargetAnnotation (#2241) --- src/main/scala/firrtl/annotations/Annotation.scala | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3