[llvm-commits] [llvm] r77579 - in /llvm/trunk/lib: Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Transforms/IPO/ArgumentPromotion.cpp Transforms/IPO/GlobalOpt.cpp Transforms/Scalar/ScalarReplAggregates.cpp Transforms/Utils/PromoteMemoryToRegister.cpp

Chris Lattner clattner at apple.com
Wed Jul 29 23:09:34 PDT 2009


On Jul 29, 2009, at 9:20 PM, Daniel Dunbar wrote:

> Author: ddunbar
> Date: Wed Jul 29 23:20:37 2009
> New Revision: 77579
>
> URL: http://llvm.org/viewvc/llvm-project?rev=77579&view=rev
> Log:
> Switch obvious clients to Twine instead of utostr (when they were  
> already using
> a Twine, e.g., for names).
> - I am a little ambivalent about this; we don't want the string  
> conversion of
>   utostr, but using overload '+' mixed with string and integer  
> arguments is
>   sketchy. On the other hand, this particular usage is something of  
> an idiom.

Why not make these Twine constructors explicit, requiring something  
like:

   ... TheAlloca->getName()+"."+Twine(i)

That would make it really obvious and explicit what is going on.  It  
also would work for cases like:

"." + i + Foo->getName();

which right now will silently do a really wrong thing. :)

-Chris




More information about the llvm-commits mailing list