nik created this revision. Looks like this one was forgotten for clang_parseTranslationUnit*, as LIBCLANG_NOTHREADS is checked for/in:
clang_saveTranslationUnit() clang_reparseTranslationUnit() clang_codeCompleteAt() clang_indexTranslationUnit() clang_indexSourceFile() https://reviews.llvm.org/D36821 Files: tools/libclang/CIndex.cpp Index: tools/libclang/CIndex.cpp =================================================================== --- tools/libclang/CIndex.cpp +++ tools/libclang/CIndex.cpp @@ -3504,6 +3504,12 @@ CIdx, source_filename, command_line_args, num_command_line_args, llvm::makeArrayRef(unsaved_files, num_unsaved_files), options, out_TU); }; + + if (getenv("LIBCLANG_NOTHREADS")) { + ParseTranslationUnitImpl(); + return result; + } + llvm::CrashRecoveryContext CRC; if (!RunSafely(CRC, ParseTranslationUnitImpl)) {
Index: tools/libclang/CIndex.cpp =================================================================== --- tools/libclang/CIndex.cpp +++ tools/libclang/CIndex.cpp @@ -3504,6 +3504,12 @@ CIdx, source_filename, command_line_args, num_command_line_args, llvm::makeArrayRef(unsaved_files, num_unsaved_files), options, out_TU); }; + + if (getenv("LIBCLANG_NOTHREADS")) { + ParseTranslationUnitImpl(); + return result; + } + llvm::CrashRecoveryContext CRC; if (!RunSafely(CRC, ParseTranslationUnitImpl)) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits