[llvm] r178941 - Dwarf: use utostr on CUID to append to SmallString.
Rafael Ávila De Espíndola
rafael.espindola at gmail.com
Sat Apr 6 06:30:27 PDT 2013
Test case?
Sent from my iPhone
On 2013-04-05, at 21:02, 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