summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-10 00:19:43 +0000
committerDevang Patel <dpatel@apple.com>2010-03-10 00:19:43 +0000
commit05c37d2800e39c2798704c865d90b5420cfca4a5 (patch)
tree86c3d3603b7b6c09e93e205e493c8817a06426b2 /clang/lib
parent575398e29b5cfdabe4e74ea66b908d1030b86e63 (diff)
downloadbcm5719-llvm-05c37d2800e39c2798704c865d90b5420cfca4a5.tar.gz
bcm5719-llvm-05c37d2800e39c2798704c865d90b5420cfca4a5.zip
Use SmallString instead of alloca.
llvm-svn: 98112
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 4f255ec840e..705d7f3c527 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -774,8 +774,9 @@ 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.
- char *FwdDeclName = (char *)alloca(65);
- sprintf(FwdDeclName, "fwd.type.%d", FwdDeclCount++);
+ llvm::SmallString<256> FwdDeclName;
+ FwdDeclName.resize(256);
+ sprintf(&FwdDeclName[0], "fwd.type.%d", FwdDeclCount++);
llvm::DIDescriptor FDContext =
getContextDescriptor(dyn_cast<Decl>(RD->getDeclContext()), Unit);
llvm::DICompositeType FwdDecl =
OpenPOWER on IntegriCloud