]> granicus.if.org Git - clang/commitdiff
[Tooling] Expose ExecutorConcurrency option.
authorDiego Astiazaran <diegoaat97@gmail.com>
Wed, 7 Aug 2019 18:35:28 +0000 (18:35 +0000)
committerDiego Astiazaran <diegoaat97@gmail.com>
Wed, 7 Aug 2019 18:35:28 +0000 (18:35 +0000)
D65628 requires a flag to specify the number of threads for a clang-doc step. It would be good to use ExecutorConcurrency after exposing it instead of creating a new one that has the same purpose.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368196 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Tooling/AllTUsExecution.h
lib/Tooling/AllTUsExecution.cpp

index e670f54234a673a8fa4d93fded13fb174f3d67dd..f051119392f792cc624f44eb1973764436230f3b 100644 (file)
@@ -71,6 +71,7 @@ private:
   unsigned ThreadCount;
 };
 
+extern llvm::cl::opt<unsigned> ExecutorConcurrency;
 extern llvm::cl::opt<std::string> Filter;
 
 } // end namespace tooling
index ca9db7a561beda64780e5ef7ddf073e2ee1d695a..6bda195f6977801809e28714b3d8a9292d671d2d 100644 (file)
@@ -147,7 +147,7 @@ llvm::Error AllTUsToolExecutor::execute(
   return llvm::Error::success();
 }
 
-static llvm::cl::opt<unsigned> ExecutorConcurrency(
+llvm::cl::opt<unsigned> ExecutorConcurrency(
     "execute-concurrency",
     llvm::cl::desc("The number of threads used to process all files in "
                    "parallel. Set to 0 for hardware concurrency. "