summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-19 23:33:46 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-19 23:33:46 +0000
commit8c444c407eb34c8cb00d0ec546bea07ccbf9479c (patch)
treeab322c6488fc19d7d897cee9d8edba00e105a98a
parentc569c1651d7694a72530bc26ca4e824838091c45 (diff)
downloadbcm5719-llvm-8c444c407eb34c8cb00d0ec546bea07ccbf9479c.tar.gz
bcm5719-llvm-8c444c407eb34c8cb00d0ec546bea07ccbf9479c.zip
Use a SmallVector here instead of a VLA.
llvm-svn: 131698
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 9695fdce3f1..7759164e51c 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1481,25 +1481,25 @@ ClangASTContext::AddMethodToCXXRecordType
// Populate the method decl with parameter decls
- ParmVarDecl *params[num_params];
+ llvm::SmallVector<ParmVarDecl *, 12> params;
for (int param_index = 0;
param_index < num_params;
++param_index)
{
- params[param_index] = ParmVarDecl::Create (*ast,
- cxx_method_decl,
- SourceLocation(),
- SourceLocation(),
- NULL, // anonymous
- method_function_prototype->getArgType(param_index),
- NULL,
- SC_None,
- SC_None,
- NULL);
+ params.push_back (ParmVarDecl::Create (*ast,
+ cxx_method_decl,
+ SourceLocation(),
+ SourceLocation(),
+ NULL, // anonymous
+ method_function_prototype->getArgType(param_index),
+ NULL,
+ SC_None,
+ SC_None,
+ NULL));
}
- cxx_method_decl->setParams (params, num_params);
+ cxx_method_decl->setParams (params.data(), num_params);
cxx_record_decl->addDecl (cxx_method_decl);
OpenPOWER on IntegriCloud