diff options
| author | Kevin Laeufer | 2021-05-21 12:58:02 -0700 |
|---|---|---|
| committer | GitHub | 2021-05-21 12:58:02 -0700 |
| commit | d35248c8efc8c7afb1b99ddea631be5e6537d46d (patch) | |
| tree | ee475dcef04e81cfe1e0013c2f36e36d4d8be7f3 | |
| parent | abb8b4c90e7218129783372235619be00a215d66 (diff) | |
Annotation: override getTargets for SingleTargetAnnotation (#2241)
| -rw-r--r-- | src/main/scala/firrtl/annotations/Annotation.scala | 3 |
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 |
