From patchwork Fri Oct 18 05:20:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Saldivar X-Patchwork-Id: 1179148 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511266-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="R/gz4Q9b"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KQw8lAzW"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46vZ9f1dGPz9sPW for ; Fri, 18 Oct 2019 16:20:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=OtGVFT7iis/NkKI8KdFtCHeTd1a4IEugsYfRLGhCpqPqiY JbmZ6jmH+fL8pu/HhLbvJjuKbPWI6cRiCxe8d+bavhCXf7LGvuUDyKurCScBK1jI fKvG8seeH4xp4K2MLRui1J1T7FqEQ/3UOrXZWoqERwDh7ioPel8z7VutbMvmw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=u1MXZBR5BxSkt1Ul/p34cYz6mf8=; b=R/gz4Q9bAMkhhHmzcNbN js92AXiez+AQWdUhwGZwtmMxAnqpr3ksbiP/XvpMAGS4zeWTAj/Hq6qr7mhMxok0 J9xFlopb2tjyeiwnl94QSCcjUOAHZD35tfnYzohkTwoW7hNI+VjvO55pvCNC4N5l LMuL7G3g9RyG0S7KPEW15Yc= Received: (qmail 21499 invoked by alias); 18 Oct 2019 05:20:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21489 invoked by uid 89); 18 Oct 2019 05:20:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:alternative X-HELO: mail-ot1-f54.google.com Received: from mail-ot1-f54.google.com (HELO mail-ot1-f54.google.com) (209.85.210.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 05:20:12 +0000 Received: by mail-ot1-f54.google.com with SMTP id k32so3944634otc.4 for ; Thu, 17 Oct 2019 22:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6e4ElfNmMFunBTR1Hz91k14Y5nCyYThZstP4GU8uH9U=; b=KQw8lAzWbBrmdhFs2r/B6wB37LBgBp0lxZbEhPn82bh1PdpiL7En7NhaxBgDqD5nIu xzQXTBlca0ObWlndrmluQdSV6vUrEBogeoDURqkoCNmZt38IwvfTZFkaEJz6fBg9JjOn WnOlLvh//yWtkAHc5f92yGJoQjBwSIC6EgKp9B61nYLUjOuTcu0m4Qx/voiEjIMMWAvu N+SNPv0UROp7n/Bnx9yghlGzoL6N7bBdM6w2AShVj2xTxW1uNfR7VV+t89yVVuxmaB+B spXp0hVsf3EZ45JePXSIk3aral/tkODI/WIKSY66UvQY5z7I4uvWhjM9NaIYfeU5oViE b0Vw== MIME-Version: 1.0 From: Miguel Saldivar Date: Thu, 17 Oct 2019 22:20:00 -0700 Message-ID: Subject: [Patch][Demangler] Fix for complex values To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes This is a small fix for Bug 67299, where symbol: `Z1fCf` which would become `f(float complex)` instead of `f(floatcomplex )`. I thought this would be the preferred way of printing, because both `llvm-cxxfilt` and `cpp_filt` both print the the mangled name in this fashion. Thanks, Miguel Saldivar From 4ca98c0749bae1389594b31ee7f6ef575aafcd8f Mon Sep 17 00:00:00 2001 From: Miguel Saldivar Date: Thu, 17 Oct 2019 16:36:19 -0700 Subject: [PATCH][Demangler] Small fix for complex values gcc/libiberty/ * cp-demangle.c (d_print_mod): Add a space before printing `complex` and `imaginary`, as opposed to after. gcc/libiberty/ * testsuite/demangle-expected: Adjust test. --- libiberty/ChangeLog | 5 +++++ libiberty/cp-demangle.c | 4 ++-- libiberty/testsuite/demangle-expected | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) _Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv -- 2.23.0 diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 97d9767c2ea..62d5527b95b 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2019-10-17 Miguel Saldivar + * cp-demangle.c (d_print_mod): Add a space before printing `complex` + and `imaginary`, as opposed to after. + * testsuite/demangle-expected: Adjust test. + 2019-10-03 Eduard-Mihai Burtescu * rust-demangle.c (looks_like_rust): Remove. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index aa78c86dd44..bd4dfb785a9 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -5977,10 +5977,10 @@ d_print_mod (struct d_print_info *dpi, int options, d_append_string (dpi, "&&"); return; case DEMANGLE_COMPONENT_COMPLEX: - d_append_string (dpi, "complex "); + d_append_string (dpi, " complex"); return; case DEMANGLE_COMPONENT_IMAGINARY: - d_append_string (dpi, "imaginary "); + d_append_string (dpi, " imaginary"); return; case DEMANGLE_COMPONENT_PTRMEM_TYPE: if (d_last_char (dpi) != '(') diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index f21ed00e559..43f003655b2 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -1278,7 +1278,7 @@ int& int_if_addable(A*) # --format=gnu-v3 _Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE -void baz(A*) +void baz(A*) # --format=gnu-v3