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()
Patch by Nikolai Kosjar!
Differential Revision: https://reviews.llvm.org/D36821
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311990
91177308-0d34-0410-b5e6-
96231b3b80d8
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)) {