summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangASTSource.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-10-07 23:18:13 +0000
committerSean Callanan <scallanan@apple.com>2011-10-07 23:18:13 +0000
commit880e680fa3ac5cb7c9d4a42ad69c5590b4cab0ac (patch)
tree1598270efe28fb84f765cd07d5bcfccb155975b9 /lldb/source/Expression/ClangASTSource.cpp
parent883ec9711530053a0f38e2cd3ef2b72af6e2ebea (diff)
downloadbcm5719-llvm-880e680fa3ac5cb7c9d4a42ad69c5590b4cab0ac.tar.gz
bcm5719-llvm-880e680fa3ac5cb7c9d4a42ad69c5590b4cab0ac.zip
Updated LLVM/Clang to pull in the latest ARM disassembler.
This involved minor changes to the way we report Objective-C methods, as well as cosmetic changes and added parameters for a variety of Clang APIs. llvm-svn: 141437
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp
index 26bf0b95b22..854fcc880d9 100644
--- a/lldb/source/Expression/ClangASTSource.cpp
+++ b/lldb/source/Expression/ClangASTSource.cpp
@@ -197,27 +197,25 @@ NameSearchContext::AddFunDecl (void *type)
unsigned NumArgs = func_proto_type->getNumArgs();
unsigned ArgIndex;
- ParmVarDecl **param_var_decls = new ParmVarDecl*[NumArgs];
-
+ SmallVector<ParmVarDecl *, 5> parm_var_decls;
+
for (ArgIndex = 0; ArgIndex < NumArgs; ++ArgIndex)
{
QualType arg_qual_type (func_proto_type->getArgType(ArgIndex));
- param_var_decls[ArgIndex] = ParmVarDecl::Create (m_ast_source.m_ast_context,
- const_cast<DeclContext*>(m_decl_context),
- SourceLocation(),
- SourceLocation(),
- NULL,
- arg_qual_type,
- NULL,
- SC_Static,
- SC_Static,
- NULL);
+ parm_var_decls.push_back(ParmVarDecl::Create (m_ast_source.m_ast_context,
+ const_cast<DeclContext*>(m_decl_context),
+ SourceLocation(),
+ SourceLocation(),
+ NULL,
+ arg_qual_type,
+ NULL,
+ SC_Static,
+ SC_Static,
+ NULL));
}
- func_decl->setParams(param_var_decls, NumArgs);
-
- delete [] param_var_decls;
+ func_decl->setParams(ArrayRef<ParmVarDecl*>(parm_var_decls));
}
m_decls.push_back(func_decl);
OpenPOWER on IntegriCloud