[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

Devang Patel devang.patel at gmail.com
Wed Nov 25 11:53:51 PST 2009


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. If I missed one
let me know. BTW, this is why I left std::string left alone
DIEObjectLabel
-
Devang



More information about the llvm-commits mailing list