summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-04-06 01:02:38 +0000
committerManman Ren <mren@apple.com>2013-04-06 01:02:38 +0000
commit5044a9395a6f19c37989d877a7cbbe21dd84c5b7 (patch)
tree711ce15aba0e03188ee72e5b768c959f46696d16 /lib
parent310f2665e8fc4f3b5fa70d3e935f00d19cae3f2f (diff)
downloadllvm-5044a9395a6f19c37989d877a7cbbe21dd84c5b7.tar.gz
llvm-5044a9395a6f19c37989d877a7cbbe21dd84c5b7.tar.bz2
llvm-5044a9395a6f19c37989d877a7cbbe21dd84c5b7.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index d3cb4f9c1c..8bd9feb92a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -643,7 +643,7 @@ unsigned DwarfDebug::getOrCreateSourceID(StringRef FileName,
// 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.