summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
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
commit69b3c433916402a06b987be4ae4537e2b968f2b5 (patch)
tree4aa17079bb170bd9ecbef68e624139a2365946bb /clang/lib/CodeGen/CGDebugInfo.cpp
parent5ac3b0be2dcc4df9db518023380645a9fdbf80dc (diff)
downloadbcm5719-llvm-69b3c433916402a06b987be4ae4537e2b968f2b5.tar.gz
bcm5719-llvm-69b3c433916402a06b987be4ae4537e2b968f2b5.zip
Use raw_ostream instead of sprintf.
llvm-svn: 98438
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 2 insertions, 3 deletions
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<Decl>(RD->getDeclContext()), Unit);
llvm::DICompositeType FwdDecl =
OpenPOWER on IntegriCloud