[llvm] r178941 - Dwarf: use utostr on CUID to append to SmallString.

Eric Christopher echristo at gmail.com
Thu Apr 11 15:39:27 PDT 2013


Did you ever commit the testcase that Rafael requested?

-eric

On Fri, Apr 5, 2013 at 6:02 PM, Manman Ren <mren at apple.com> wrote:
> Author: mren
> Date: Fri Apr  5 20:02:38 2013
> New Revision: 178941
>
> URL: http://llvm.org/viewvc/llvm-project?rev=178941&view=rev
> Log:
> Dwarf: use utostr on CUID to append to SmallString.
>
> We used to do "SmallString += CUID", which is incorrect, since CUID will
> be truncated to a char.
>
> rdar://problem/13573833
>
> Modified:
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178941&r1=178940&r2=178941&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Apr  5 20:02:38 2013
> @@ -643,7 +643,7 @@ unsigned DwarfDebug::getOrCreateSourceID
>
>    // We look up the CUID/file/dir by concatenating them with a zero byte.
>    SmallString<128> NamePair;
> -  NamePair += CUID;
> +  NamePair += utostr(CUID);
>    NamePair += '\0';
>    NamePair += DirName;
>    NamePair += '\0'; // Zero bytes are not allowed in paths.
>
>
> _______________________________________________
> 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