aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-03-13 12:06:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-03-13 12:06:51 +0000
commitfea3d4dd1a0cebafba7d85cfcb1724b644e2b8e2 (patch)
tree72bce0ad4e82cfaf737ecaef55e1b5a2f8c47b31 /lib/CodeGen
parent92d6cd2eb7594a0cfc9a14364eb2b1a6feca0417 (diff)
Use raw_ostream instead of sprintf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 925453a678..60aa4e784e 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -777,9 +777,8 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty,
// A RD->getName() is not unique. However, the debug info descriptors
// are uniqued so use type name to ensure uniquness.
- llvm::SmallString<256> FwdDeclName;
- FwdDeclName.resize(256);
- sprintf(&FwdDeclName[0], "fwd.type.%d", FwdDeclCount++);
+ llvm::SmallString<128> FwdDeclName;
+ llvm::raw_svector_ostream(FwdDeclName) << "fwd.type." << FwdDeclCount++;
llvm::DIDescriptor FDContext =
getContextDescriptor(dyn_cast<Decl>(RD->getDeclContext()), Unit);
llvm::DICompositeType FwdDecl =