Skip to content

Commit b0993e5

Browse files
committed
Use -fmodules-cache-path in all tests and avoid using CTAD with std::scoped_lock
1 parent 8e126e9 commit b0993e5

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

clang/lib/Driver/ModulesDriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ void ScanResultCollector::ClangModuleDepsCollector::mergeGraph(
582582
SmallVector<ModuleDeps *> NewModuleDeps;
583583

584584
{
585-
std::scoped_lock SL(Lock);
585+
std::scoped_lock<std::mutex> SL(Lock);
586586

587587
for (auto &MD : ModuleGraph) {
588588
if (const auto It = ModuleGraphIndexByID.find(MD.ID);
@@ -726,7 +726,7 @@ SmallVector<size_t>
726726
SystemInputRegistry::getNewSystemInputs(ArrayRef<std::string> NamedDeps) {
727727
SmallVector<size_t, 8> ToSchedule;
728728
{
729-
std::scoped_lock SL(Lock);
729+
std::scoped_lock<std::mutex> SL(Lock);
730730
for (const auto &ModuleName : NamedDeps) {
731731
const auto It = NameToManifestIndex.find(ModuleName);
732732
if (It == NameToManifestIndex.end())

clang/test/Driver/modules-driver-dep-graph-with-system-inputs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
// RUN: -stdlib=libc++ \
2828
// RUN: -resource-dir=%t/Inputs/usr/lib/x86_64-linux-gnu \
2929
// RUN: --target=x86_64-linux-gnu \
30+
// RUN: -fmodules-cache-path=%t/modules-cache \
3031
// RUN: %t/main.cpp %t/foo.cpp \
3132
// RUN: -### 2>&1 \
3233
// RUN: | sed 's:\\\\\?:/:g' \
3334
// RUN: | FileCheck %s -DPREFIX=%/t
3435

3536
// CHECK: remark: using standard modules manifest file '[[PREFIX]]/Inputs/usr/lib/x86_64-linux-gnu/libc++.modules.json' [-Rmodules-driver]
36-
// CHECK-NEXT: remark: printing module dependency graph [-Rmodules-driver]
37+
// CHECK: remark: printing module dependency graph [-Rmodules-driver]
3738
// CHECK-NEXT: digraph "Module Dependency Graph" {
3839
// CHECK-NEXT: label="Module Dependency Graph";
3940

clang/test/Driver/modules-driver-duplicate-named-module.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: split-file %s %t
44

55
// RUN: not %clang -std=c++23 -fmodules -fmodules-driver -Rmodules-driver \
6+
// RUN: -fmodules-cache-path=%t/modules-cache \
67
// RUN: %t/main.cpp %t/A1.cpp %t/A2.cpp 2>&1 \
78
// RUN: | sed 's:\\\\\?:/:g' \
89
// RUN: | FileCheck -DPREFIX=%/t --check-prefixes=CHECK %s

clang/test/Driver/modules-driver-malformed-module-manifest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// RUN: -stdlib=libc++ \
2020
// RUN: -resource-dir=%t/Inputs/usr/lib/x86_64-linux-gnu \
2121
// RUN: --target=x86_64-linux-gnu \
22+
// RUN: -fmodules-cache-path=%t/modules-cache \
2223
// RUN: main.cpp \
2324
// RUN: -### 2>&1 \
2425
// RUN: | sed 's:\\\\\?:/:g' \

clang/test/Driver/modules-driver-manifest-local-system-includes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// RUN: -stdlib=libc++ \
2525
// RUN: -resource-dir=%t/Inputs/usr/lib/x86_64-linux-gnu \
2626
// RUN: --target=x86_64-linux-gnu \
27+
// RUN: -fmodules-cache-path=%t/modules-cache \
2728
// RUN: %t/main.cpp \
2829
// RUN: -### 2>&1 \
2930
// RUN: | sed 's:\\\\\?:/:g' \

0 commit comments

Comments
 (0)