From patchwork Wed May 13 08:51:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 471762 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 CB86B140758 for ; Wed, 13 May 2015 18:53:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=WXrSYR7R; dkim-atps=neutral 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:date:message-id:subject:from:to:content-type; q= dns; s=default; b=qOALxDA4PsI9DR39AjXXs1CP6W9YDYumxP1UsO3xFUBHjB gYYF8b9tvff4+AZ/I1bThBL8FWdysuzEQptxweO86glb77RT4dwDoy2XST5E7DVd FjWVKT/iO36lRQnLKWDM/qu881GpIfSZHc2nshZAf3Hb+SklnkrmKMPS8WZ4E= 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:date:message-id:subject:from:to:content-type; s= default; bh=1bsAyj3O4gV4oI+K8uKV844F4vU=; b=WXrSYR7REi78DMhE6wMy f+2SGOEGwiCZ96lGHHwowf9CbX1cXr1egY7A5gjIehbY88QJjIJA1gv64oUHbSYP 9qUkT7pFHKLyagv2jGsWQ+/2QtDxgbv7j5mSOGOwVlGj/KD1KwyYQoLcnkbH/Lw2 RM3rgI+xs8iNh/CZJSw4tc4= Received: (qmail 1673 invoked by alias); 13 May 2015 08:51:47 -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 1504 invoked by uid 89); 13 May 2015 08:51:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 13 May 2015 08:51:46 +0000 Received: by qgdy78 with SMTP id y78so17935538qgd.0 for ; Wed, 13 May 2015 01:51:44 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.55.25.42 with SMTP id k42mr39595851qkh.66.1431507104163; Wed, 13 May 2015 01:51:44 -0700 (PDT) Received: by 10.229.215.4 with HTTP; Wed, 13 May 2015 01:51:44 -0700 (PDT) Date: Wed, 13 May 2015 10:51:44 +0200 Message-ID: Subject: [PATCH 7/7] [D] libiberty: Add support for cent and ucent types From: Iain Buclaw To: gcc-patches , Ian Lance Taylor X-IsSubscribed: yes The next version of D adds support for cent and ucent for platforms that are able to handle them natively. This adds support for demangling them. --- libiberty/ChangeLog: 2015-05-13 Iain Buclaw * d-demangle.c (dlang_type): Handle cent and ucent types. * testsuite/d-demangle-expected: Add coverage tests for cent and ucent. From 7fe0bf5d0b218f18cba3097be8c166e9934091eb Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Mon, 11 May 2015 22:21:13 +0200 Subject: [PATCH 7/7] D demangle: Add support for cent and ucent types --- libiberty/d-demangle.c | 14 ++++++++++++++ libiberty/testsuite/d-demangle-expected | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index a7821d8..5c0f356 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -669,6 +669,20 @@ dlang_type (string *decl, const char *mangled) mangled++; string_append (decl, "dchar"); return mangled; + case 'z': + mangled++; + switch (*mangled) + { + case 'i': + mangled++; + string_append (decl, "cent"); + return mangled; + case 'k': + mangled++; + string_append (decl, "ucent"); + return mangled; + } + return NULL; default: /* unhandled */ return NULL; diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index d88fb26..580da9b 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -114,6 +114,14 @@ _D8demangle4testFwZv demangle.test(dchar) # --format=dlang +_D8demangle4testFziZv +demangle.test(cent) +# +--format=dlang +_D8demangle4testFzkZv +demangle.test(ucent) +# +--format=dlang _D8demangle4testFOaZv demangle.test(shared(char)) # -- 2.1.0