[llvm-commits] [PATCH] Replace uses of strcpy and memcpy in llvm-nm.cpp

Martinez, Javier E javier.e.martinez at intel.com
Thu Oct 11 20:50:48 PDT 2012


Hi Dmitri,

Sorry for the delay but here's a revised patch. Please review.

Thanks,
Javier

-----Original Message-----
From: Dmitri Gribenko [mailto:gribozavr at gmail.com] 
Sent: Saturday, October 06, 2012 6:37 AM
To: Martinez, Javier E
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Replace uses of strcpy and memcpy in llvm-nm.cpp

On Wed, Oct 3, 2012 at 9:55 AM, Martinez, Javier E <javier.e.martinez at intel.com> wrote:
> Hello,
>
> This patch is to remove the use of strcpy in llvm-nm.cpp and replace 
> it with format objects. Please review and commit if it looks good.

Saving format objects somewhere instead of using them directly  with the raw_ostream contradicts the design intent of raw_ostream and makes the code more complicated than it was before.

Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-nm.cpp.patch
Type: application/octet-stream
Size: 946 bytes
Desc: llvm-nm.cpp.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121012/f5813d94/attachment.obj>


More information about the llvm-commits mailing list