[llvm-commits] [llvm] r89793 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DIE.h lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h
Dale Johannesen
dalej at apple.com
Wed Nov 25 11:57:24 PST 2009
On Nov 25, 2009, at 11:53 AM, Devang Patel wrote:
> On Wed, Nov 25, 2009 at 11:43 AM, Daniel Dunbar <daniel at zuster.org>
> wrote:
>>
>> This particular change might not be a good idea. A StringRef is
>> just a
>> reference, so whether this is safe or not depends on whether clients
>> are disallowed from passing in strings whose lifetime will not extend
>> pass that of the DIEString. I suspect this should remain std::string.
>> For example, this will fail:
>> --
>> addString(die, attr, form, std::string("foo") + "bar");
>> --
>
> I checked all uses of addString() and they are safe.
Future uses could also be a problem. If there are restrictions on
the use of addString please make sure this is documented (commented).
> If I missed one
> let me know. BTW, this is why I left std::string left alone
> DIEObjectLabel
> -
> Devang
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list