[Tooling] Restore working dir in ClangTool.
authorIlya Biryukov <ibiryukov@google.com>
Tue, 11 Sep 2018 07:29:09 +0000 (07:29 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Tue, 11 Sep 2018 07:29:09 +0000 (07:29 +0000)
commit008eda080786e110914f4aa57d31342098046c94
tree88ce3b59ebf9370d944bef13834607019c032f2c
parentec605d38461795c9e916cf536a0b2048ede86c1a
[Tooling] Restore working dir in ClangTool.

Summary:
And add an option to disable this behavior. The option is only used in
AllTUsExecutor to avoid races when running concurrently on multiple
threads.

This fixes PR38869 introduced by r340937.

Reviewers: ioeric, steveire

Reviewed By: ioeric

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D51864

llvm-svn: 341910
clang/include/clang/Tooling/Tooling.h
clang/lib/Tooling/AllTUsExecution.cpp
clang/lib/Tooling/Tooling.cpp