]> granicus.if.org Git - clang/commit
Allocate CodeCompletionString and all of its components in a
authorDouglas Gregor <dgregor@apple.com>
Tue, 1 Feb 2011 19:23:04 +0000 (19:23 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 1 Feb 2011 19:23:04 +0000 (19:23 +0000)
commit218937c13ef5b0625a70aad41ca7a92da9278bd2
treef965c5449f5d1b9ae07e755f619958abc5db0a44
parent0e2dc3a1159806c8303b0979be1ce1526cc64ed3
Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/ASTUnit.h
include/clang/Sema/CodeCompleteConsumer.h
include/clang/Sema/Sema.h
lib/Frontend/ASTUnit.cpp
lib/Sema/CodeCompleteConsumer.cpp
lib/Sema/SemaCodeComplete.cpp
tools/libclang/CIndexCodeCompletion.cpp