[llvm] r178941 - Dwarf: use utostr on CUID to append to SmallString.
Manman Ren
mren at apple.com
Fri Apr 5 18:02:38 PDT 2013
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.
More information about the llvm-commits
mailing list