[libc-commits] [libc] f00567e - [libc][NFC] Move blockstore out of the CPP folder

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Aug 19 14:52:07 PDT 2022


Author: Guillaume Chatelet
Date: 2022-08-19T21:51:53Z
New Revision: f00567ecebadc9759e83fc7ace3415c66b549639

URL: https://github.com/llvm/llvm-project/commit/f00567ecebadc9759e83fc7ace3415c66b549639
DIFF: https://github.com/llvm/llvm-project/commit/f00567ecebadc9759e83fc7ace3415c66b549639.diff

LOG: [libc][NFC] Move blockstore out of the CPP folder

Added: 
    libc/src/__support/blockstore.h
    libc/test/src/__support/blockstore_test.cpp

Modified: 
    libc/src/__support/CMakeLists.txt
    libc/src/__support/CPP/CMakeLists.txt
    libc/src/stdlib/CMakeLists.txt
    libc/src/stdlib/atexit.cpp
    libc/test/src/__support/CMakeLists.txt
    libc/test/src/__support/CPP/CMakeLists.txt

Removed: 
    libc/src/__support/CPP/blockstore.h
    libc/test/src/__support/CPP/blockstore_test.cpp


################################################################################
diff  --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 0061f14dbfcf5..b50986f2c08bd 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -1,5 +1,11 @@
 add_subdirectory(CPP)
 
+add_header_library(
+  blockstore
+  HDRS
+    blockstore.h
+)
+
 add_header_library(
   common
   HDRS

diff  --git a/libc/src/__support/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt
index 1a03710c6f70d..9937c951c5d69 100644
--- a/libc/src/__support/CPP/CMakeLists.txt
+++ b/libc/src/__support/CPP/CMakeLists.txt
@@ -102,12 +102,6 @@ add_header_library(
     atomic.h
 )
 
-add_header_library(
-  blockstore
-  HDRS
-    blockstore.h
-)
-
 add_header_library(
   error
   HDRS

diff  --git a/libc/src/__support/CPP/blockstore.h b/libc/src/__support/blockstore.h
similarity index 100%
rename from libc/src/__support/CPP/blockstore.h
rename to libc/src/__support/blockstore.h

diff  --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 8ad582ebaa73f..d3dd5b2068b0c 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -287,7 +287,7 @@ add_entrypoint_object(
     20 # For constinit of the atexit callback list.
   DEPENDS
     libc.src.__support.fixedvector
-    libc.src.__support.CPP.blockstore
+    libc.src.__support.blockstore
     libc.src.__support.threads.mutex
 )
 

diff  --git a/libc/src/stdlib/atexit.cpp b/libc/src/stdlib/atexit.cpp
index 806e2c050162e..7725463b8eb74 100644
--- a/libc/src/stdlib/atexit.cpp
+++ b/libc/src/stdlib/atexit.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/stdlib/atexit.h"
-#include "src/__support/CPP/blockstore.h"
+#include "src/__support/blockstore.h"
 #include "src/__support/common.h"
 #include "src/__support/fixedvector.h"
 #include "src/__support/threads/mutex.h"

diff  --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index 2f9c4e7267629..893e33166ef4c 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -1,5 +1,15 @@
 add_libc_testsuite(libc_support_unittests)
 
+add_libc_unittest(
+  blockstore_test
+  SUITE
+    libc_support_unittests
+  SRCS
+    blockstore_test.cpp
+  DEPENDS
+    libc.src.__support.blockstore
+)
+
 add_libc_unittest(
   endian_test
   SUITE

diff  --git a/libc/test/src/__support/CPP/CMakeLists.txt b/libc/test/src/__support/CPP/CMakeLists.txt
index 5bc4860386737..e958b4b85b973 100644
--- a/libc/test/src/__support/CPP/CMakeLists.txt
+++ b/libc/test/src/__support/CPP/CMakeLists.txt
@@ -71,16 +71,6 @@ add_libc_unittest(
     libc.src.__support.CPP.atomic
 )
 
-add_libc_unittest(
-  blockstore_test
-  SUITE
-    libc_cpp_utils_unittests
-  SRCS
-    blockstore_test.cpp
-  DEPENDS
-    libc.src.__support.CPP.blockstore
-)
-
 add_libc_unittest(
   stringstream_test
   SUITE

diff  --git a/libc/test/src/__support/CPP/blockstore_test.cpp b/libc/test/src/__support/blockstore_test.cpp
similarity index 98%
rename from libc/test/src/__support/CPP/blockstore_test.cpp
rename to libc/test/src/__support/blockstore_test.cpp
index a9f00283dad55..3edbb920144bd 100644
--- a/libc/test/src/__support/CPP/blockstore_test.cpp
+++ b/libc/test/src/__support/blockstore_test.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "src/__support/CPP/blockstore.h"
+#include "src/__support/blockstore.h"
 #include "utils/UnitTest/Test.h"
 
 struct Element {


        


More information about the libc-commits mailing list