Message ID | 20211118025606.554809-2-guillermo.e.martinez@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> 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 4423F385841B for <patchwork@sourceware.org>; Thu, 18 Nov 2021 02:57:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4423F385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637204245; bh=kDkS4Bl4AmAatNQ27zGOrXROMtjfDYgZL3ewBmZv1zg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=xY62pEONqyu7ri0VUHjI+yNf2+DgAvmLvJXUON2by05e/i+RIjQ6KR4bs7WZhlHhG goWQtyYJnv7m8r0YAW1AKEjduOZcM57oyiMQbrc6qttcGnZdZOLYCO69Df3sczgACq xlBEn9gUd2StRrKbrtH+PQk75fVND/7AxzrVh5T8= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 41C213858C2C for <libabigail@sourceware.org>; Thu, 18 Nov 2021 02:57:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41C213858C2C Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AI1Y9IQ019268 for <libabigail@sourceware.org>; Thu, 18 Nov 2021 02:57:20 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3cd2w8v43f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <libabigail@sourceware.org>; Thu, 18 Nov 2021 02:57:19 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AI2uIuu117162 for <libabigail@sourceware.org>; Thu, 18 Nov 2021 02:57:18 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2104.outbound.protection.outlook.com [104.47.55.104]) by userp3030.oracle.com with ESMTP id 3ca2fyry84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <libabigail@sourceware.org>; Thu, 18 Nov 2021 02:57:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4sJxAJDNP1LwAUDsHKNpo3vyLHvu5uIGwinpf9hUeOTzDkwc16IrU3AQvt8ywhHg1ww40rBTyvUSIaF/Uwc7mmxEU9YgDxYW8YbmJu+KMp+1fJrWM9cIieFJwnTXyyb8T3X6wgOufIaQq0+cZCoMpqF6Pkob5oa8EL8t+5pqyI+AlE5FSRuqiUdPN6x4N9H8QimFK0b6HXDLxVUHCBYjTax5Z1li1A+H1u7lKDlFANbRdTEq5vOq+FEuJCQ02ivPZzplkNw8GEjiTwx7inlwvmqMps0G2Zr1VcQeZWfBu5lHTNoBI8SY4jV/MO/8U+shwsNN4xo5fI9l+30zSGa+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kDkS4Bl4AmAatNQ27zGOrXROMtjfDYgZL3ewBmZv1zg=; b=nb3MmZwzClxqF5Rgof2h+NghKm+kRh9vX4Gls3wbpFZUpbBIB8+fM0O9VR0ufiWIPPMskZC2pvcoSRA1WjvHjK+CJnHFHIEtA5WNtEdumVl+tf9OgNAV8UUltfKcPy4c0t0yPDbmbqGWc7EFtjiiTjOUlc1o7S3sYPVeMgo3XqwGR24zrRCBRyPruYOWJG7ShNUYgTjwgf4+LJDG12B9JJlQFa9oLQsRuK4rQMzGSdrEW+tNKWJMYQNA5Z1s/IC0e6U+G/hoT0UdZnRiV9dzTXSFzksA7eBAbDEKdZKmGUfYeMCjx2nNHUt1nCJJrTBah6sZwGLYiVflXORic9DhNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) by MN2PR10MB4014.namprd10.prod.outlook.com (2603:10b6:208:182::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Thu, 18 Nov 2021 02:57:16 +0000 Received: from BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765]) by BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765%7]) with mapi id 15.20.4713.021; Thu, 18 Nov 2021 02:57:16 +0000 To: libabigail@sourceware.org Subject: [PATCH 1/3] ctf-reader: Use argument by reference reading the context Date: Wed, 17 Nov 2021 20:56:04 -0600 Message-Id: <20211118025606.554809-2-guillermo.e.martinez@oracle.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211118025606.554809-1-guillermo.e.martinez@oracle.com> References: <20211118025606.554809-1-guillermo.e.martinez@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0601CA0004.namprd06.prod.outlook.com (2603:10b6:803:2f::14) To BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) MIME-Version: 1.0 Received: from sali.us.oracle.com (2606:b400:8004:44::13) by SN4PR0601CA0004.namprd06.prod.outlook.com (2603:10b6:803:2f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 02:57:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 80110995-3fbf-47b2-7639-08d9aa3f1f23 X-MS-TrafficTypeDiagnostic: MN2PR10MB4014: X-Microsoft-Antispam-PRVS: <MN2PR10MB4014572E91E08395D0B234DABA9B9@MN2PR10MB4014.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ty47SKWS9d6plPuQY/KgjL6iejODCEmhoZ2tsHgl522OkZsO4Ti463wRJ2jdzgt2K6Op5Y7n66aSNFXC0hmskNa+fzjDwIs/bC4Iyb5sSEL+NBkc6HYKLQARI21dd5bGK/ymwYicnTn54lOkLZlN7EyfoL1ooDZR2Lf3CP9NPSAL9WVeTMsNp2+xdoFHckBL3wgY4uveqW3J45lyOAVNJOm7HHpYBrlDWDoKhH7d5tE0+450LH40LRSopd/GSZarAhZ6wJiQ3qrGGEH0vSwPFUv4AO7JiNY433aRXvuJ9wwW5+DpF6TZR4bOt8p0A1kgGAtb6Fq7/12YBalacgP3MiojpqebWMn7Cy+B5SfEQ1x9/KphKdYM4rBC6LT8BGVs7mAmHfQSrDzNthTLIdYM8OdF+vSWxOQxNtc7Udka40T6QwDJ1e4EBjzPM2/SbJUCyoL6xk13d/BfGvupOJdNzU6HX+N/JtL0ri5h50NwonKKyh7nhjN2/6emKD2AFixOU6v7skdm2ZYV4bb5bPWXq/E3aDHPtj+iaS3Yc6khGNhVRP9q5dwIm7HJ5RQn6Dg2kKNCG6dh17qL6P1ZSonpwW39PaKrRpxqtddjqVHWtHKT0qAGP0BGMwILFMMuIvJNfsEkkydWLfmS0GCBlrBiGQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR10MB2852.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(66946007)(103116003)(2906002)(66556008)(6916009)(8936002)(6486002)(4326008)(107886003)(186003)(316002)(1076003)(66476007)(86362001)(6666004)(2616005)(52116002)(8676002)(5660300002)(7696005)(83380400001)(38100700002)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J6iRZvRTf4KXzu6D1YakeY5TwK0zrDvXAhYqrP42qbQO1oW9IyihVP3uK5GcXkLibs0DttoYPVMugJWCz3UzKMV64JRXDnAzHIHJsgS24Jedy10iP3PqD8+hXN6D7QhYWGDsD9PeIIR74KGbz+VdxpWCWy1dnYWcPcjZTNAb6cGrPQTEWb5TRC3vnS9xU6Ww/6Fq8/cjSrBAsVXuGb2Rf8cxbCjAGqZ+iOUbG8ZQ9C9pCscFZBAfcUseiB/U6G6BONABT41blb00HGeaQZE0r2NTR2y9LTtrsOpw6SIsqphU1wn53GqEWYiArKF6IlDOIPsOZF+gSJk7XCQ8broNHZ4ccAC6PNVS2XLzCIIPTe7a3VN7BPfJSS7u6jptp2st+5aThBVybpsL4bf/99hrNSkr7ENnU4vt1WUApQ0W0L4VhdnIUwMYV86MYpVTDENfxtgf+dE9KpS5YJXfWFuFCWmOZXaRBGqj9GSfO3pE9BdzKSGNiDl7wIUKS9wFQrYJnMwkoo5PYDsIOOzAG9LBQo2YmqGvYPR3cSymJON7SCzdo9S7MopppbN5B50goYn5bjMIzMSg6v1+qiS+yhGlAY2FVXbsjM6Bmh5FPXbruD+e8sC8RhBf8dcGax94q2YnchYFA78ib98xCt6d9cDv1JqgaOwr7F/UkVGBz65ICTrSUj6Dn+1Vd6a0R1I4VryLrjSFrBYehdkj+IFMeHRIyy1xN0eBvVDF3pwF1WYxs/U1SD8TODEAe7VmTCYr6m58NXXSXy7CCIxK0Gg49PRf/56qD0O1jyHJp1ccdQgiuzS2LWyl8Ud+6kCrNphkakdOJ3nlvyU6TjwFUwca4qwpLsCR+uM5KqjGI4mLn32b4lQ2lm79VxXQeyio6JTciRKBwibEPokRJgTVphkaCLy02H08xNkCzk5zxHuStfANpH9iwfhUr6nizSDYBiz6TSLsSXWvU8A2HEFZSuyIoml8QY2zshswD+yizQTd6O1EIDgC7BErxa1hkifNdaLT4CEvjW28YZzD5K+HdgU6vN773wFnMrqvZfnFxMX+hLVUNnRiag51JaQqrEdPuMIi5HpwGBOT8ax4Tn06wCJPZw3PWzFMVVqC3NN7+V8FitWZUlp4Z7Rpck7AjwjZTyo71x4p0vVQxUrwSkIhlswYGsh2rvU3H0xa6gCN7+gVB7ZpEnTkIWR35ZonPWnEnE7/8O8CGXtGoRexMM0BYm3kF4lwaJyHJwM3mOAIWy28YUNV0deyoQVg3QODG1EULbCu+LjCRV3eBXnq7scBN7c3+EIh4GtWd771I7NLz3AcWNlK9tV1d38T4Tas0Mp54JV/rTx2d/hUIUgmRZjqYZMWWo06nKA5SldvzZe7HfRYYf37jfXYpFmrw+j/lSg7GqbaHgsJKr90ldAZ3vWT4ZI3uY/tHId5X9yOqsjQIJ1cK+EQqAb1vuJla501bbBJqo4PgEGIECbV9lrxd7rsxFXDUOaz0eHTYy176XQSQzwdqur5DhbtKGTDaGyB9bhYqWyQW1QkOqDX0gxEkRSZTJUwCYYSKpRME/CbJkA8QMTD9dNJ05c0HI5M2fEQjkrvYbreuYXbyNLAXjDN9yTo071hHxylrsJXNJuitrZ8AC/mt5o9Zj88Fjz4oySMEx2fqKtlD8tspsv7jCZif24TPZFnLXcQgP88vsDbon9sKqVXd8dn4vQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80110995-3fbf-47b2-7639-08d9aa3f1f23 X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB2852.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 02:57:16.2907 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q13JWfT8+BYyhUcRVSqZIsy8uHspV9JreHspIhPlJN1UK+aHD9eY8V2KLD3qXatycCbBCWW7G1DH7WU4g+RKAUf9Oz5YONtL2jw0EtThjdc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4014 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10171 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180015 X-Proofpoint-GUID: AM8W1r7-_YggYE9xT_qDJMEsAOBtylD2 X-Proofpoint-ORIG-GUID: AM8W1r7-_YggYE9xT_qDJMEsAOBtylD2 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> From: "Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> Reply-To: "Guillermo E. Martinez" <guillermo.e.martinez@oracle.com> Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" <libabigail-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Some improvements in ctf-reader.
|
|
Commit Message
Guillermo E. Martinez
Nov. 18, 2021, 2:56 a.m. UTC
* src/abg-ctf-reader.cc (read_context): Use const argument pass by reference. (create_read_context): Likewise. --- include/abg-ctf-reader.h | 8 ++++---- src/abg-ctf-reader.cc | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-)
Comments
Hello Guillermo, Thanks for your patch! I just have some small nits to pick. Please find my comments below: "Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> a écrit: > * src/abg-ctf-reader.cc (read_context): Use const argument > pass by reference. > (create_read_context): Likewise. Here each line should be prefixed by a "tab", as explained in the COMMIT-LOG-GUIDELINES file in the source tree at https://sourceware.org/git/?p=libabigail.git;a=blob_plain;f=COMMIT-LOG-GUIDELINES;hb=HEAD. Also, there are some changes in the the file include/abg-ctf-reader.h. I added them to this ChangeLog part of the commit log. You'll find my updated version of your patch below. Would you please sign it off by adding a line starting by "Signed-off-by:" with your name and email, as explained in the file CONTRIBUTING at https://sourceware.org/git/?p=libabigail.git;a=blob_plain;f=CONTRIBUTING;hb=HEAD ? I need that sign-off before committing the patch. Thanks a lot! From ee0308d607b36fc4c5e3e4d815deb7ecf8884ad6 Mon Sep 17 00:00:00 2001 From: "Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> Date: Wed, 17 Nov 2021 20:56:04 -0600 Subject: [PATCH] ctf-reader: Use argument by reference reading the context * include/abg-ctf-reader.h (create_read_context): Pass the string by reference. * src/abg-ctf-reader.cc (ctf_reader::read_context): Likewise. (create_read_context): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> --- include/abg-ctf-reader.h | 8 ++++---- src/abg-ctf-reader.cc | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h index c0d8bb2b..56b2bf91 100644 --- a/include/abg-ctf-reader.h +++ b/include/abg-ctf-reader.h @@ -25,10 +25,10 @@ namespace ctf_reader { class read_context; -read_context *create_read_context (std::string elf_path, - ir::environment *env); -corpus_sptr read_corpus (read_context *ctxt, - elf_reader::status& status); +read_context *create_read_context(const std::string& elf_path, + ir::environment *env); +corpus_sptr read_corpus(read_context *ctxt, + elf_reader::status& status); } // end namespace ctf_reader } // end namespace abigail diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 0370c8aa..2c2c204d 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -102,7 +102,7 @@ public: /// Constructor. /// /// @param elf_path the path to the ELF file. - read_context(string elf_path, ir::environment *env) + read_context(const string& elf_path, ir::environment *env) { types_map.clear(); filename = elf_path; @@ -1060,7 +1060,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp) /// @param env a libabigail IR environment. read_context * -create_read_context(std::string elf_path, ir::environment *env) +create_read_context(const std::string& elf_path, + ir::environment *env) { return new read_context(elf_path, env); }
On Thursday, November 18, 2021 11:26:41 AM CST Dodji Seketeli wrote: > Hello Guillermo, Hello Dodji > Thanks for your patch! > > I just have some small nits to pick. > > Please find my comments below: Thanks! > "Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> a > écrit: > > > * src/abg-ctf-reader.cc (read_context): Use const argument > > pass by reference. > > (create_read_context): Likewise. > > Here each line should be prefixed by a "tab", as explained in the > COMMIT-LOG-GUIDELINES file in the source tree at > https://sourceware.org/git/?p=libabigail.git;a=blob_plain;f=COMMIT-LOG-GUIDELINES;hb=HEAD. > > Also, there are some changes in the the file include/abg-ctf-reader.h. > I added them to this ChangeLog part of the commit log. Thanks! > You'll find my updated version of your patch below. Would you please > sign it off by adding a line starting by "Signed-off-by:" with your name > and email, as explained in the file CONTRIBUTING at > https://sourceware.org/git/?p=libabigail.git;a=blob_plain;f=CONTRIBUTING;hb=HEAD > ? I need that sign-off before committing the patch. Ok, I will do. > Thanks a lot! Thanks to you for the comments! > From ee0308d607b36fc4c5e3e4d815deb7ecf8884ad6 Mon Sep 17 00:00:00 2001 > From: "Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> > Date: Wed, 17 Nov 2021 20:56:04 -0600 > Subject: [PATCH] ctf-reader: Use argument by reference reading the context > > * include/abg-ctf-reader.h (create_read_context): Pass the string > by reference. > * src/abg-ctf-reader.cc (ctf_reader::read_context): Likewise. > (create_read_context): Likewise. > > Signed-off-by: Dodji Seketeli <dodji@redhat.com> > --- > include/abg-ctf-reader.h | 8 ++++---- > src/abg-ctf-reader.cc | 5 +++-- > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h > index c0d8bb2b..56b2bf91 100644 > --- a/include/abg-ctf-reader.h > +++ b/include/abg-ctf-reader.h > @@ -25,10 +25,10 @@ namespace ctf_reader > { > > class read_context; > -read_context *create_read_context (std::string elf_path, > - ir::environment *env); > -corpus_sptr read_corpus (read_context *ctxt, > - elf_reader::status& status); > +read_context *create_read_context(const std::string& elf_path, > + ir::environment *env); > +corpus_sptr read_corpus(read_context *ctxt, > + elf_reader::status& status); > > } // end namespace ctf_reader > } // end namespace abigail > diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc > index 0370c8aa..2c2c204d 100644 > --- a/src/abg-ctf-reader.cc > +++ b/src/abg-ctf-reader.cc > @@ -102,7 +102,7 @@ public: > /// Constructor. > /// > /// @param elf_path the path to the ELF file. > - read_context(string elf_path, ir::environment *env) > + read_context(const string& elf_path, ir::environment *env) > { > types_map.clear(); > filename = elf_path; > @@ -1060,7 +1060,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp) > /// @param env a libabigail IR environment. > > read_context * > -create_read_context(std::string elf_path, ir::environment *env) > +create_read_context(const std::string& elf_path, > + ir::environment *env) > { > return new read_context(elf_path, env); > } Cheers, Guillermo
diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h index c0d8bb2b..56b2bf91 100644 --- a/include/abg-ctf-reader.h +++ b/include/abg-ctf-reader.h @@ -25,10 +25,10 @@ namespace ctf_reader { class read_context; -read_context *create_read_context (std::string elf_path, - ir::environment *env); -corpus_sptr read_corpus (read_context *ctxt, - elf_reader::status& status); +read_context *create_read_context(const std::string& elf_path, + ir::environment *env); +corpus_sptr read_corpus(read_context *ctxt, + elf_reader::status& status); } // end namespace ctf_reader } // end namespace abigail diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 0370c8aa..2c2c204d 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -102,7 +102,7 @@ public: /// Constructor. /// /// @param elf_path the path to the ELF file. - read_context(string elf_path, ir::environment *env) + read_context(const string& elf_path, ir::environment *env) { types_map.clear(); filename = elf_path; @@ -1060,7 +1060,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp) /// @param env a libabigail IR environment. read_context * -create_read_context(std::string elf_path, ir::environment *env) +create_read_context(const std::string& elf_path, + ir::environment *env) { return new read_context(elf_path, env); }