Use SmallString instead of alloca.
llvm-svn: 98112
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 4f255ec..705d7f3 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -774,8 +774,9 @@
// 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 =