diff options
author | Erik Verbruggen <erikjv@me.com> | 2017-11-14 09:34:39 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2017-11-14 09:34:39 +0000 |
commit | 3cc3911cc0b53579b52e34f828155db38fce8d17 (patch) | |
tree | aab71600c36ff224ef0c0d999a64cdaf55ab7451 /clang/tools/libclang/Indexing.cpp | |
parent | 45ab559ee7b1586b12cf6b81480003ba4d80c295 (diff) | |
download | bcm5719-llvm-3cc3911cc0b53579b52e34f828155db38fce8d17.tar.gz bcm5719-llvm-3cc3911cc0b53579b52e34f828155db38fce8d17.zip |
[libclang] Allow crash recovery with LIBCLANG_NOTHREADS
Enabled crash recovery for some libclang operations on a calling thread even
when LIBCLANG_NOTHREAD is specified.
Previously it would only run under crash recovery if LIBCLANG_NOTHREAD is not
set. Moved handling of LIBCLANG_NOTHREAD env variable into RunSafely from its
call sites.
llvm-svn: 318142
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 2a136242ef5..021ebcfcfe4 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -880,11 +880,6 @@ int clang_indexSourceFileFullArgv( TU_options); }; - if (getenv("LIBCLANG_NOTHREADS")) { - IndexSourceFileImpl(); - return result; - } - llvm::CrashRecoveryContext CRC; if (!RunSafely(CRC, IndexSourceFileImpl)) { @@ -934,11 +929,6 @@ int clang_indexTranslationUnit(CXIndexAction idxAction, index_options, TU); }; - if (getenv("LIBCLANG_NOTHREADS")) { - IndexTranslationUnitImpl(); - return result; - } - llvm::CrashRecoveryContext CRC; if (!RunSafely(CRC, IndexTranslationUnitImpl)) { |