]> granicus.if.org Git - clang/commit
[code-complete] Introduce CodeCompletionTUInfo which will be used for caching
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 10 Apr 2012 17:23:48 +0000 (17:23 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 10 Apr 2012 17:23:48 +0000 (17:23 +0000)
commit28a83f57003469fb615ad27dd34bcf5b0a10da8c
tree9e59e61651170d8f2e02b6b6f630f274a600f3c3
parent42963612a4187b55685b7f75489c11abd3fa100e
[code-complete] Introduce CodeCompletionTUInfo which will be used for caching
code-completion related strings specific to a translation unit (ASTContext and related data)

CodeCompletionAllocator does such limited caching, by caching the name assigned
to a DeclContext*, but that is not the appropriate place since that object has
a lifetime that can extend beyond that of an ASTContext.

Introduce CodeCompletionTUInfo which will be always tied to a translation unit
to do this kind of caching and move the caching of CodeCompletionAllocator into this
object, and propagate it to all the places where it will be needed.

The plan is to extend the caching where appropriate, using CodeCompletionTUInfo,
to avoid re-calculating code-completion strings.

Part of rdar://10796159.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154408 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
tools/libclang/CXCursor.cpp