diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-28 02:18:05 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-28 02:18:05 +0000 |
commit | 7317a5cbfcf7c309ca3c5635ec9fac9b1f3a76f1 (patch) | |
tree | e181054664ae06fc89dc952fb8cdee28956d1160 /clang/tools/libclang/CIndexCodeCompletion.cpp | |
parent | c557bada5a2f61f70aaaecc7a38607934c1f5ee9 (diff) | |
download | bcm5719-llvm-7317a5cbfcf7c309ca3c5635ec9fac9b1f3a76f1.tar.gz bcm5719-llvm-7317a5cbfcf7c309ca3c5635ec9fac9b1f3a76f1.zip |
[libclang] Introduce options to control the priority for the threads
that libclang creates.
-Introduce CXGlobalOptFlags enum for the new options that can be
set on the CXIndex object.
-CXGlobalOpt_ThreadBackgroundPriorityForIndexing affects:
clang_indexSourceFile
clang_indexTranslationUnit
clang_parseTranslationUnit
clang_saveTranslationUnit
-CXGlobalOpt_ThreadBackgroundPriorityForEditing affects:
clang_reparseTranslationUnit
clang_codeCompleteAt
clang_annotateTokens
rdar://9075282
llvm-svn: 153562
Diffstat (limited to 'clang/tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r-- | clang/tools/libclang/CIndexCodeCompletion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index 1b4a7e48000..c5bc8c8dd4d 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/tools/libclang/CIndexCodeCompletion.cpp @@ -666,6 +666,10 @@ void clang_codeCompleteAt_Impl(void *UserData) { if (!AST) return; + CIndexer *CXXIdx = (CIndexer*)TU->CIdx; + if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForEditing)) + setBackGroundPriority(); + ASTUnit::ConcurrencyCheck Check(*AST); // Perform the remapping of source files. |