[cfe-commits] r143242 - /cfe/trunk/tools/libclang/CIndex.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Oct 28 15:54:33 PDT 2011
Author: akirtzidis
Date: Fri Oct 28 17:54:33 2011
New Revision: 143242
URL: http://llvm.org/viewvc/llvm-project?rev=143242&view=rev
Log:
[libclang] Check for environment variable CINDEXTEST_NOTHREADS in clang_reparseTranslationUnit.
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=143242&r1=143241&r2=143242&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Fri Oct 28 17:54:33 2011
@@ -2718,6 +2718,12 @@
unsigned options) {
ReparseTranslationUnitInfo RTUI = { TU, num_unsaved_files, unsaved_files,
options, 0 };
+
+ if (getenv("CINDEXTEST_NOTHREADS")) {
+ clang_reparseTranslationUnit_Impl(&RTUI);
+ return RTUI.result;
+ }
+
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, clang_reparseTranslationUnit_Impl, &RTUI)) {
More information about the cfe-commits
mailing list