[cfe-commits] r170978 - /cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Dec 21 20:48:07 PST 2012
Author: akirtzidis
Date: Fri Dec 21 22:48:07 2012
New Revision: 170978
URL: http://llvm.org/viewvc/llvm-project?rev=170978&view=rev
Log:
[libclang] Check for the 'LIBCLANG_NOTHREADS' environment variable before creating
a separate thread for code-completion.
Modified:
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=170978&r1=170977&r2=170978&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Fri Dec 21 22:48:07 2012
@@ -825,6 +825,12 @@
CodeCompleteAtInfo CCAI = { TU, complete_filename, complete_line,
complete_column, unsaved_files, num_unsaved_files,
options, 0 };
+
+ if (getenv("LIBCLANG_NOTHREADS")) {
+ clang_codeCompleteAt_Impl(&CCAI);
+ return CCAI.result;
+ }
+
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, clang_codeCompleteAt_Impl, &CCAI)) {
More information about the cfe-commits
mailing list