From e8572f1f4665478c5da26d46383cb6b219f313c8 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 13 Aug 2025 08:33:43 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q?itial=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.6 --- llvm/unittests/CAS/ObjectStoreTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/unittests/CAS/ObjectStoreTest.cpp b/llvm/unittests/CAS/ObjectStoreTest.cpp index c036d31bf3836..c865882ee3fa7 100644 --- a/llvm/unittests/CAS/ObjectStoreTest.cpp +++ b/llvm/unittests/CAS/ObjectStoreTest.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "llvm/CAS/ObjectStore.h" +#include "llvm/Config/llvm-config.h" #include "llvm/Support/Process.h" #include "llvm/Support/RandomNumberGenerator.h" #include "llvm/Support/ThreadPool.h" @@ -329,6 +330,7 @@ static void testBlobsParallel1(ObjectStore &CAS, uint64_t BlobSize) { testBlobsParallel(CAS, CAS, CAS, CAS, BlobSize); } +#if LLVM_ENABLE_THREADS TEST_P(CASTest, BlobsParallel) { std::shared_ptr CAS = createObjectStore(); uint64_t Size = 1ULL * 1024; @@ -342,4 +344,5 @@ TEST_P(CASTest, BlobsBigParallel) { uint64_t Size = 100ULL * 1024; ASSERT_NO_FATAL_FAILURE(testBlobsParallel1(*CAS, Size)); } -#endif +#endif // EXPENSIVE_CHECKS +#endif // LLVM_ENABLE_THREADS From 0c584dbf8b4e4108d96eb0f10b22e29681bf5f7c Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 13 Aug 2025 09:52:15 -0700 Subject: [PATCH 2/2] fix unused static function warning when thread is not enabled Created using spr 1.3.6 --- llvm/unittests/CAS/ObjectStoreTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/unittests/CAS/ObjectStoreTest.cpp b/llvm/unittests/CAS/ObjectStoreTest.cpp index c865882ee3fa7..e82f96ec345c7 100644 --- a/llvm/unittests/CAS/ObjectStoreTest.cpp +++ b/llvm/unittests/CAS/ObjectStoreTest.cpp @@ -269,6 +269,7 @@ TEST_P(CASTest, NodesBig) { ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded()); } +#if LLVM_ENABLE_THREADS /// Common test functionality for creating blobs in parallel. You can vary which /// cas instances are the same or different, and the size of the created blobs. static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2, @@ -330,7 +331,6 @@ static void testBlobsParallel1(ObjectStore &CAS, uint64_t BlobSize) { testBlobsParallel(CAS, CAS, CAS, CAS, BlobSize); } -#if LLVM_ENABLE_THREADS TEST_P(CASTest, BlobsParallel) { std::shared_ptr CAS = createObjectStore(); uint64_t Size = 1ULL * 1024;