diff --git a/ir/base.def b/ir/base.def index 55672794acc..3b72129e49a 100644 --- a/ir/base.def +++ b/ir/base.def @@ -355,11 +355,11 @@ class Annotation { return expr[idx]; } inline auto &getKV() { - BUG_CHECK(annotationKind() == Kind::StructuredKVList, "Annotation does not contain a key-value list."); + BUG_CHECK(std::holds_alternative(body), "Annotation does not contain a key-value list."); return std::get(body); } inline const auto &getKV() const { - BUG_CHECK(annotationKind() == Kind::StructuredKVList, "Annotation does not contain a key-value list."); + BUG_CHECK(std::holds_alternative(body), "Annotation does not contain a key-value list."); return std::get(body); }