summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2019-08-06 20:43:25 +0000
committerAlex Lorenz <arphaman@gmail.com>2019-08-06 20:43:25 +0000
commite1f4c4aad27992d6b8a0b8d85af42c14fa68c298 (patch)
tree82d894bcc36d70ad55cf69960f89683730a99578 /clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
parente4bd38478b38ab752af54b380da9f265fd90ba72 (diff)
downloadbcm5719-llvm-e1f4c4aad27992d6b8a0b8d85af42c14fa68c298.tar.gz
bcm5719-llvm-e1f4c4aad27992d6b8a0b8d85af42c14fa68c298.zip
[clang-scan-deps] Implementation of dependency scanner over minimized sources
This commit implements the fast dependency scanning mode in clang-scan-deps: the preprocessing is done on files that are minimized using the dependency directives source minimizer. A shared file system cache is used to ensure that the file system requests and source minimization is performed only once. The cache assumes that the underlying filesystem won't change during the course of the scan (or if it will, it will not affect the output), and it can't be evicted. This means that the service and workers can be used for a single run of a dependency scanner, and can't be reused across multiple, incremental runs. This is something that we'll most likely support in the future though. Note that the driver still utilizes the underlying real filesystem. This commit is also still missing the fast skipped PP block skipping optimization that I mentioned at EuroLLVM talk. Additionally, the file manager is still not reused by the threads as well. Differential Revision: https://reviews.llvm.org/D63907 llvm-svn: 368086
Diffstat (limited to 'clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp')
-rw-r--r--clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
new file mode 100644
index 00000000000..48aa68218c3
--- /dev/null
+++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
@@ -0,0 +1,16 @@
+//===- DependencyScanningService.cpp - clang-scan-deps service ------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Tooling/DependencyScanning/DependencyScanningService.h"
+
+using namespace clang;
+using namespace tooling;
+using namespace dependencies;
+
+DependencyScanningService::DependencyScanningService(ScanningMode Mode)
+ : Mode(Mode) {}
OpenPOWER on IntegriCloud