From patchwork Mon Feb 12 21:30:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 85635 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 349463858408 for ; Mon, 12 Feb 2024 21:30:47 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9B1293858C52 for ; Mon, 12 Feb 2024 21:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B1293858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9B1293858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707773442; cv=none; b=EsMPDbV1sEQwRQMF0jMi9IUyldEu/zfuEqnDEAUuzh00QWq9qWgHYfFjdsbAKrdL/Ba7thOAVSyJAadcVuU4Heq9dCqwb3L36UXlb9mMJFGudHn/a5kGU4d+nNGkoltsSVtIsKmMurKMAKup8jXXJz7bvqpGseB2T7AVh25mrrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707773442; c=relaxed/simple; bh=gU/x97+9P6imS0dLcdFvT+j9Okkt8zXo1Z842HPTwOA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pfD1+7Lj2RiPgDYVGp9IeV1j6oow1wMgy4MX6FbWuo4v5MJHkniqGERPL/alMXkJmqMq3QVhdqFF48wvbRczXYBE7DfT9WBIsyNFYqeD8IhaKvooZiapUAJuczSAUCbtkyU1qi9igYYbY6LxVcqCgqoSjvOIUX+OXsEtuu1+ozw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707773440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3m3EJMEjfRoH0akjZuhQf+YgnSB3jR4fs39aKeky/A8=; b=XgCVPCQB2lcAbzzgP0GdDIOO676Z2FW63vTm7XIn+US9RAaIwtM3QvvYb+E4qdTiStCuhC 2oktgU04sFo/fMp6iFgLaox0KSVZN+2618238+eiiiqyA1T2j0wEy9wFd1YKUg/Wntyjxb NjTbw47uMO0Yg6TfEpw6S3k41QiTBEE= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-rUUyMNX5PaeZyWb6xygnHQ-1; Mon, 12 Feb 2024 16:30:39 -0500 X-MC-Unique: rUUyMNX5PaeZyWb6xygnHQ-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-68058b0112cso70394826d6.1 for ; Mon, 12 Feb 2024 13:30:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707773438; x=1708378238; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3m3EJMEjfRoH0akjZuhQf+YgnSB3jR4fs39aKeky/A8=; b=C6m5oIP4fNZwFHkyPJOMfLyyN6jpv8v/bZFgd0Id9ObYaEodMDaxzkRykltwOrAiWG s//XzpMQWMfoTIa4VP5/+caPZ+OIgb44koGzvCGplfdxz5GxGdSB9KaAc2nnr032TD2O Fcr1H0Cef7/y2wQQogDcLceytZRNpqIcDugVY/haw/fNeIFXObo4PJyX7FqyzpWArgnQ bohkzVqpRhTYHj6ilfP2iPmI/7+6rUK+Kjp6iv5FeDI87k1SGzp9SkZC1KPMOmS0aWVO xOqRnLeBL7UVKoXjecL3YMvVf6ocswuy3zTkGp9aOu/kYDjM2sVNrdAuvmSMe6kzooEM iLPg== X-Gm-Message-State: AOJu0YxrNJ1qkU4XxhnTmjNu7/297fYHZWnlpp5fESMxOfVO5yP1YJcu xH2/43PfqlulvcCgfXMAdYj6dIFJJTi7fjAR/4wKKwp2QNQwRba5NZsf/pGaVdnZFL62zMoeel2 3TfYwqVW3ob26B64Q5YA5iJyPN+GElJT2SUzWGEdyEnlUlXJIY07Y4SYQxzCoHzy+pg== X-Received: by 2002:a05:6214:2aa2:b0:68d:1859:b1c7 with SMTP id js2-20020a0562142aa200b0068d1859b1c7mr2506475qvb.3.1707773438324; Mon, 12 Feb 2024 13:30:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5KKCVveot/30VjwR5rRjIEY9dW46CucvHckpc31JhWBsZFnH1vYrARVmh5xfvYZ4KSQ7xzg== X-Received: by 2002:a05:6214:2aa2:b0:68d:1859:b1c7 with SMTP id js2-20020a0562142aa200b0068d1859b1c7mr2506460qvb.3.1707773437980; Mon, 12 Feb 2024 13:30:37 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWJnI8wdPaT8OoL5k3bZMyl00u2EUQHE/d4B5eLua4W1s/A2++FJt+6WkQ4J5MgQuvyK34J+u6MbtawrmRO9vLg Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id nw8-20020a0562143a0800b006869485d9eesm566851qvb.82.2024.02.12.13.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 13:30:37 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 06DB7B4FCA; Mon, 12 Feb 2024 22:30:35 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applying to mainline] ir: Introduce a missing IR kind for subrange types Organization: Red Hat / France X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Mon, 12 Feb 2024 22:30:35 +0100 Message-ID: <87r0hhxtdw.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, Array subranges were introduced to support the Ada language. In doing so, I forgot to define an enum type_or_decl_kind enumerator for the array_type_def::subrange_type IR node. This patch fixes that. * include/abg-ir.h (type_or_decl_kind::SUBRANGE_TYPE): Add a new enumerator to enum type_or_decl_kind::type_or_decl_kind. * src/abg-ir.cc (array_type_def::subrange_type::subrange_type): Use the new type_or_decl_kind::SUBRANGE_TYPE to flag the IR node representing array_type_def::subrange_type. Signed-off-by: Dodji Seketeli Applying to the master branch. --- include/abg-ir.h | 23 ++++++++++++----------- src/abg-ir.cc | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/abg-ir.h b/include/abg-ir.h index a500762a..964d1397 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -1385,17 +1385,18 @@ protected: ABSTRACT_TYPE_BASE = 1 << 9, ABSTRACT_SCOPE_TYPE_DECL = 1 << 10, BASIC_TYPE = 1 << 11, - QUALIFIED_TYPE = 1 << 12, - POINTER_TYPE = 1 << 13, - REFERENCE_TYPE = 1 << 14, - POINTER_TO_MEMBER_TYPE = 1 << 15, - ARRAY_TYPE = 1 << 16, - ENUM_TYPE = 1 << 17, - TYPEDEF_TYPE = 1 << 18, - CLASS_TYPE = 1 << 19, - UNION_TYPE = 1 << 20, - FUNCTION_TYPE = 1 << 21, - METHOD_TYPE = 1 << 22, + SUBRANGE_TYPE = 1 << 12, + QUALIFIED_TYPE = 1 << 13, + POINTER_TYPE = 1 << 14, + REFERENCE_TYPE = 1 << 15, + POINTER_TO_MEMBER_TYPE = 1 << 16, + ARRAY_TYPE = 1 << 17, + ENUM_TYPE = 1 << 18, + TYPEDEF_TYPE = 1 << 19, + CLASS_TYPE = 1 << 20, + UNION_TYPE = 1 << 21, + FUNCTION_TYPE = 1 << 22, + METHOD_TYPE = 1 << 23, }; // end enum type_or_decl_kind enum type_or_decl_kind diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 58e19c5b..f4d9174f 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -18700,7 +18700,7 @@ array_type_def::subrange_type::subrange_type(const environment& env, const type_base_sptr& utype, const location& loc, translation_unit::language l) - : type_or_decl_base(env, ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), + : type_or_decl_base(env, SUBRANGE_TYPE | ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), type_base(env, upper_bound.get_unsigned_value() - lower_bound.get_unsigned_value(), @@ -18731,7 +18731,7 @@ array_type_def::subrange_type::subrange_type(const environment& env, bound_value upper_bound, const location& loc, translation_unit::language l) - : type_or_decl_base(env, ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), + : type_or_decl_base(env, SUBRANGE_TYPE | ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), type_base(env, upper_bound.get_unsigned_value() - lower_bound.get_unsigned_value(), 0), @@ -18758,7 +18758,7 @@ array_type_def::subrange_type::subrange_type(const environment& env, bound_value upper_bound, const location& loc, translation_unit::language l) - : type_or_decl_base(env, ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), + : type_or_decl_base(env, SUBRANGE_TYPE | ABSTRACT_TYPE_BASE | ABSTRACT_DECL_BASE), type_base(env, upper_bound.get_unsigned_value(), 0), decl_base(env, name, loc, ""), priv_(new priv(upper_bound, l))