From 69b3c433916402a06b987be4ae4537e2b968f2b5 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 13 Mar 2010 12:06:51 +0000 Subject: Use raw_ostream instead of sprintf. llvm-svn: 98438 --- clang/lib/CodeGen/CGDebugInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 925453a678e..60aa4e784e6 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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(RD->getDeclContext()), Unit); llvm::DICompositeType FwdDecl = -- cgit v1.2.3