llvm::makeArrayRef(unsaved_files, num_unsaved_files), options, out_TU);
};
- if (getenv("LIBCLANG_NOTHREADS")) {
- ParseTranslationUnitImpl();
- return result;
- }
-
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, ParseTranslationUnitImpl)) {
result = clang_saveTranslationUnit_Impl(TU, FileName, options);
};
- if (!CXXUnit->getDiagnostics().hasUnrecoverableErrorOccurred() ||
- getenv("LIBCLANG_NOTHREADS")) {
+ if (!CXXUnit->getDiagnostics().hasUnrecoverableErrorOccurred()) {
SaveTranslationUnitImpl();
if (getenv("LIBCLANG_RESOURCE_USAGE"))
TU, llvm::makeArrayRef(unsaved_files, num_unsaved_files), options);
};
- if (getenv("LIBCLANG_NOTHREADS")) {
- ReparseTranslationUnitImpl();
- return result;
- }
-
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, ReparseTranslationUnitImpl)) {
unsigned Size) {
if (!Size)
Size = GetSafetyThreadStackSize();
- if (Size)
+ if (Size && !getenv("LIBCLANG_NOTHREADS"))
return CRC.RunSafelyOnThread(Fn, Size);
return CRC.RunSafely(Fn);
}
llvm::makeArrayRef(unsaved_files, num_unsaved_files), options);
};
- if (getenv("LIBCLANG_NOTHREADS")) {
- CodeCompleteAtImpl();
- return result;
- }
-
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, CodeCompleteAtImpl)) {
TU_options);
};
- if (getenv("LIBCLANG_NOTHREADS")) {
- IndexSourceFileImpl();
- return result;
- }
-
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, IndexSourceFileImpl)) {
index_options, TU);
};
- if (getenv("LIBCLANG_NOTHREADS")) {
- IndexTranslationUnitImpl();
- return result;
- }
-
llvm::CrashRecoveryContext CRC;
if (!RunSafely(CRC, IndexTranslationUnitImpl)) {