Skip to content

Commit ab4d429

Browse files
authored
Merge pull request #10317 from benlangmuir/ondisk-no
[cas] Fix build and tests with -DLLVM_ENABLE_ONDISK_CAS=0
2 parents 8d0d6d7 + adaff0e commit ab4d429

16 files changed

+24
-1
lines changed

Diff for: clang/test/ClangScanDeps/cas-fs-multiple-commands.c

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// there will be separate -E, -emit-llvm-bc, -S, and -cc1as jobs, which should
33
// each result in a "command" in the output.
44

5+
// REQUIRES: ondisk_cas
6+
57
// We use an x86_64-apple-darwin target to avoid host-dependent behaviour in
68
// the driver. Platforms without an integrated assembler have different commands
79
// REQUIRES: x86-registered-target

Diff for: clang/test/ClangScanDeps/include-tree-multiple-commands.c

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// there will be separate -E, -emit-llvm-bc, -S, and -cc1as jobs, which should
33
// each result in a "command" in the output.
44

5+
// REQUIRES: ondisk_cas
6+
57
// We use an x86_64-apple-darwin target to avoid host-dependent behaviour in
68
// the driver. Platforms without an integrated assembler have different commands
79
// REQUIRES: x86-registered-target

Diff for: clang/test/ClangScanDeps/include-tree-preserve-pch-path.c

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: ondisk_cas
2+
13
// RUN: split-file %s %t
24
// RUN: sed -e "s|DIR|%/t|g" %t/cdb_pch.json.template > %t/cdb_pch.json
35
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json

Diff for: clang/test/ClangScanDeps/include-tree-working-directory.c

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: ondisk_cas
2+
13
// RUN: rm -rf %t
24
// RUN: mkdir -p %t/other
35
// RUN: split-file %s %t

Diff for: clang/test/ClangScanDeps/modules-include-tree-working-directory.c

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: ondisk_cas
2+
13
// RUN: rm -rf %t
24
// RUN: mkdir -p %t/other
35
// RUN: split-file %s %t

Diff for: clang/test/Index/Core/scan-deps-cas.m

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: ondisk_cas
2+
13
// RUN: rm -rf %t
24

35
// RUN: c-index-test core --scan-deps -working-dir %S -output-dir=%t -cas-path %t/cas \

Diff for: llvm/lib/CAS/OnDiskHashMappedTrie.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,7 @@ OnDiskHashMappedTrie::create(const Twine &PathTwine, const Twine &TrieNameTwine,
16181618
size_t NumHashBits, uint64_t DataSize,
16191619
uint64_t MaxFileSize,
16201620
std::optional<uint64_t> NewFileInitialSize,
1621+
std::shared_ptr<OnDiskCASLogger> Logger,
16211622
std::optional<size_t> NewTableNumRootBits,
16221623
std::optional<size_t> NewTableNumSubtrieBits) {
16231624
report_fatal_error("not supported");
@@ -1668,6 +1669,7 @@ struct OnDiskDataAllocator::ImplType {};
16681669
Expected<OnDiskDataAllocator> OnDiskDataAllocator::create(
16691670
const Twine &Path, const Twine &TableName, uint64_t MaxFileSize,
16701671
std::optional<uint64_t> NewFileInitialSize, uint32_t UserHeaderSize,
1672+
std::shared_ptr<OnDiskCASLogger> Logger,
16711673
function_ref<void(void *)> UserHeaderInit) {
16721674
report_fatal_error("not supported");
16731675
}

Diff for: llvm/test/DebugInfo/CAS/AArch64/debug_line_and_info_dedupe.test

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
REQUIRES: ondisk_cas
12
RUN: rm -rf %t && mkdir -p %t
23
RUN: split-file %s %t
34

Diff for: llvm/test/DebugInfo/CAS/AArch64/debug_unopt.ll

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; REQUIRES: ondisk_cas
12
; RUN: llc -debug-info-unopt -O0 --filetype=obj --cas-backend --cas=%t/cas --mccas-casid --mtriple=arm64-apple-darwin %s -o %t/debug_unopt.id
23
; RUN: llvm-cas-dump --cas=%t/cas --casid-file %t/debug_unopt.id | FileCheck %s
34

Diff for: llvm/test/DebugInfo/CAS/AArch64/multiple_cus.ll

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; REQUIRES: ondisk_cas
12
; RUN: llc -cas-friendly-debug-info -O0 --filetype=obj --cas-backend --cas=%t/cas --mccas-verify --mtriple=arm64-apple-darwin %s -o %t/multiple_cus.o 2>&1 | FileCheck %s --allow-empty
23
; CHECK-NOT: error in backend: CASBackend output round-trip verification error
34

Diff for: llvm/test/tools/llvm-cas-dump/basic_debug_test.ll

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; REQUIRES: ondisk_cas
12
; RUN: rm -rf %t.casdb
23
; RUN: llc -cas-friendly-debug-info -O0 --filetype=obj --cas-backend --cas=%t.casdb --mccas-casid -o %t.casid %s
34
; RUN: llvm-cas-dump --cas=%t.casdb --dwarf-sections-only --dwarf-dump --casid-file %t.casid | FileCheck %s --check-prefix=DWARF

Diff for: llvm/test/tools/llvm-cas-dump/enums_split.ll

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; REQUIRES: ondisk_cas
12
; RUN: rm -rf %t.casdb
23
; RUN: llc -O0 --filetype=obj --cas-backend --cas=%t.casdb --mccas-casid -o %t_DIE.casid %s
34
; RUN: llvm-cas-dump --cas=%t.casdb --casid-file %t_DIE.casid --die-refs | FileCheck %s --check-prefix=DWARF-DIE

Diff for: llvm/test/tools/llvm-cas-dump/stats-dump.test

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
REQUIRES: ondisk_cas
12
RUN: rm -rf %t && mkdir -p %t
23
RUN: llc %S/Inputs/stats-dump.ll -O0 --filetype=obj --cas-backend --cas %t/cas --mccas-casid -o %t/stats-dump.id
34

Diff for: llvm/test/tools/llvm-cas-dump/types_split.ll

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; REQUIRES: ondisk_cas
12
; RUN: rm -rf %t.casdb
23
; RUN: llc -O0 --filetype=obj --cas-backend --cas=%t.casdb --mccas-casid -o %t_DIE.casid %s
34
; RUN: llvm-cas-dump --cas=%t.casdb --casid-file %t_DIE.casid --die-refs | FileCheck %s --check-prefix=DWARF-DIE

Diff for: llvm/test/tools/llvm-cas-object-format/materialize-objects.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: x86-registered-target
1+
// REQUIRES: x86-registered-target, ondisk_cas
22
// RUN: rm -rf %t && mkdir -p %t
33
// RUN: llvm-mc -cas %t/cas -cas-backend -mccas-casid -triple x86_64-apple-darwin10 %s -filetype=obj -o %t/test.o
44
// RUN: cd %t && llvm-cas --ingest --cas %t/cas --casid-file %t/test.o > %t/output.casid

Diff for: llvm/unittests/CAS/BuiltinUnifiedCASDatabasesTest.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using namespace llvm;
99
using namespace llvm::cas;
1010

11+
#if LLVM_ENABLE_ONDISK_CAS
1112
TEST(BuiltinUnifiedCASDatabases,
1213
MaterializationCheckPreventsGarbageCollection) {
1314
unittest::TempDir Temp("on-disk-unified-cas", /*Unique=*/true);
@@ -57,3 +58,4 @@ TEST(BuiltinUnifiedCASDatabases,
5758
ASSERT_TRUE(IsMaterialized);
5859
});
5960
}
61+
#endif

0 commit comments

Comments
 (0)