From 34f90a00973c345e652c9c5c90c9966603df5cfa Mon Sep 17 00:00:00 2001 From: Sarah Mashayekhi Date: Fri, 6 Nov 2020 17:31:15 +0000 Subject: [PATCH] [validation] make validator directory Change-Id: Ia5caea84b48b37f0bee9582ee4c8514da4ee3978 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31981 Commit-Queue: David Neto Reviewed-by: David Neto --- BUILD.gn | 20 +++++++++---------- include/tint/tint.h | 2 +- src/CMakeLists.txt | 18 ++++++++--------- .../vertex_pulling_transform_test.cc | 2 +- src/{ => validator}/validator.cc | 4 ++-- src/{ => validator}/validator.h | 8 ++++---- .../validator_control_block_test.cc | 4 ++-- .../validator_function_test.cc | 4 ++-- src/{ => validator}/validator_impl.cc | 2 +- src/{ => validator}/validator_impl.h | 6 +++--- src/{ => validator}/validator_test.cc | 4 ++-- src/{ => validator}/validator_test_helper.cc | 2 +- src/{ => validator}/validator_test_helper.h | 8 ++++---- 13 files changed, 42 insertions(+), 42 deletions(-) rename src/{ => validator}/validator.cc (92%) rename src/{ => validator}/validator.h (91%) rename src/{ => validator}/validator_control_block_test.cc (99%) rename src/{ => validator}/validator_function_test.cc (99%) rename src/{ => validator}/validator_impl.cc (99%) rename src/{ => validator}/validator_impl.h (97%) rename src/{ => validator}/validator_test.cc (99%) rename src/{ => validator}/validator_test_helper.cc (94%) rename src/{ => validator}/validator_test_helper.h (88%) diff --git a/BUILD.gn b/BUILD.gn index 1a1aae1e05..b94c05496e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -410,12 +410,12 @@ source_set("libtint_core_src") { "src/type_determiner.h", "src/type_manager.cc", "src/type_manager.h", - "src/validator.cc", - "src/validator.h", - "src/validator_impl.cc", - "src/validator_impl.h", - "src/validator_test_helper.cc", - "src/validator_test_helper.h", + "src/validator/validator.cc", + "src/validator/validator.h", + "src/validator/validator_impl.cc", + "src/validator/validator_impl.h", + "src/validator/validator_test_helper.cc", + "src/validator/validator_test_helper.h", "src/writer/text.cc", "src/writer/text.h", "src/writer/text_generator.cc", @@ -738,8 +738,8 @@ source_set("tint_unittests_core_src") { "src/ast/case_statement_test.cc", "src/ast/constant_id_decoration_test.cc", "src/ast/continue_statement_test.cc", - "src/ast/decoration_test.cc", "src/ast/decorated_variable_test.cc", + "src/ast/decoration_test.cc", "src/ast/discard_statement_test.cc", "src/ast/else_statement_test.cc", "src/ast/expression_test.cc", @@ -794,9 +794,9 @@ source_set("tint_unittests_core_src") { "src/transform/vertex_pulling_transform_test.cc", "src/type_determiner_test.cc", "src/type_manager_test.cc", - "src/validator_control_block_test.cc", - "src/validator_function_test.cc", - "src/validator_test.cc", + "src/validator/validator_control_block_test.cc", + "src/validator/validator_function_test.cc", + "src/validator/validator_test.cc", ] configs += [ diff --git a/include/tint/tint.h b/include/tint/tint.h index ade7f9ce69..a0ec913afd 100644 --- a/include/tint/tint.h +++ b/include/tint/tint.h @@ -28,7 +28,7 @@ #include "src/transform/vertex_pulling_transform.h" #include "src/type_determiner.h" #include "src/type_manager.h" -#include "src/validator.h" +#include "src/validator/validator.h" #include "src/writer/writer.h" #if TINT_BUILD_SPV_READER diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f5e1945cd2..1cc7808d69 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -231,12 +231,12 @@ set(TINT_LIB_SRCS type_determiner.h type_manager.cc type_manager.h - validator.cc - validator.h - validator_impl.cc - validator_impl.h - validator_test_helper.cc - validator_test_helper.h + validator/validator.cc + validator/validator.h + validator/validator_impl.cc + validator/validator_impl.h + validator/validator_test_helper.cc + validator/validator_test_helper.h writer/text.cc writer/text.h writer/text_generator.cc @@ -404,9 +404,9 @@ set(TINT_TEST_SRCS transform/vertex_pulling_transform_test.cc type_determiner_test.cc type_manager_test.cc - validator_control_block_test.cc - validator_function_test.cc - validator_test.cc + validator/validator_control_block_test.cc + validator/validator_function_test.cc + validator/validator_test.cc ) ## Tint library diff --git a/src/transform/vertex_pulling_transform_test.cc b/src/transform/vertex_pulling_transform_test.cc index 740c3dc109..4a5715e791 100644 --- a/src/transform/vertex_pulling_transform_test.cc +++ b/src/transform/vertex_pulling_transform_test.cc @@ -26,7 +26,7 @@ #include "src/ast/type/i32_type.h" #include "src/ast/type/void_type.h" #include "src/type_determiner.h" -#include "src/validator.h" +#include "src/validator/validator.h" namespace tint { namespace transform { diff --git a/src/validator.cc b/src/validator/validator.cc similarity index 92% rename from src/validator.cc rename to src/validator/validator.cc index 5af8414e52..e1496497c8 100644 --- a/src/validator.cc +++ b/src/validator/validator.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/validator.h" +#include "src/validator/validator.h" -#include "src/validator_impl.h" +#include "src/validator/validator_impl.h" namespace tint { diff --git a/src/validator.h b/src/validator/validator.h similarity index 91% rename from src/validator.h rename to src/validator/validator.h index 0a70fc6067..631ba0e5cb 100644 --- a/src/validator.h +++ b/src/validator/validator.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_VALIDATOR_H_ -#define SRC_VALIDATOR_H_ +#ifndef SRC_VALIDATOR_VALIDATOR_H_ +#define SRC_VALIDATOR_VALIDATOR_H_ #include #include @@ -22,7 +22,7 @@ #include "src/ast/expression.h" #include "src/ast/module.h" #include "src/ast/statement.h" -#include "src/validator_impl.h" +#include "src/validator/validator_impl.h" namespace tint { @@ -55,4 +55,4 @@ class Validator { } // namespace tint -#endif // SRC_VALIDATOR_H_ +#endif // SRC_VALIDATOR_VALIDATOR_H_ diff --git a/src/validator_control_block_test.cc b/src/validator/validator_control_block_test.cc similarity index 99% rename from src/validator_control_block_test.cc rename to src/validator/validator_control_block_test.cc index 9baa0f0f42..7406aae1b3 100644 --- a/src/validator_control_block_test.cc +++ b/src/validator/validator_control_block_test.cc @@ -28,8 +28,8 @@ #include "src/ast/variable.h" #include "src/ast/variable_decl_statement.h" #include "src/type_determiner.h" -#include "src/validator_impl.h" -#include "src/validator_test_helper.h" +#include "src/validator/validator_impl.h" +#include "src/validator/validator_test_helper.h" namespace tint { namespace { diff --git a/src/validator_function_test.cc b/src/validator/validator_function_test.cc similarity index 99% rename from src/validator_function_test.cc rename to src/validator/validator_function_test.cc index 3a496f3edd..861474488d 100644 --- a/src/validator_function_test.cc +++ b/src/validator/validator_function_test.cc @@ -26,8 +26,8 @@ #include "src/ast/variable.h" #include "src/ast/variable_decl_statement.h" #include "src/type_determiner.h" -#include "src/validator_impl.h" -#include "src/validator_test_helper.h" +#include "src/validator/validator_impl.h" +#include "src/validator/validator_test_helper.h" namespace tint { namespace { diff --git a/src/validator_impl.cc b/src/validator/validator_impl.cc similarity index 99% rename from src/validator_impl.cc rename to src/validator/validator_impl.cc index 1e681bbd6f..37ef83c20b 100644 --- a/src/validator_impl.cc +++ b/src/validator/validator_impl.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/validator_impl.h" +#include "src/validator/validator_impl.h" #include #include diff --git a/src/validator_impl.h b/src/validator/validator_impl.h similarity index 97% rename from src/validator_impl.h rename to src/validator/validator_impl.h index 4a5fe64a8b..bfa1c9b45f 100644 --- a/src/validator_impl.h +++ b/src/validator/validator_impl.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_VALIDATOR_IMPL_H_ -#define SRC_VALIDATOR_IMPL_H_ +#ifndef SRC_VALIDATOR_VALIDATOR_IMPL_H_ +#define SRC_VALIDATOR_VALIDATOR_IMPL_H_ #include #include @@ -123,4 +123,4 @@ class ValidatorImpl { } // namespace tint -#endif // SRC_VALIDATOR_IMPL_H_ +#endif // SRC_VALIDATOR_VALIDATOR_IMPL_H_ diff --git a/src/validator_test.cc b/src/validator/validator_test.cc similarity index 99% rename from src/validator_test.cc rename to src/validator/validator_test.cc index c234637233..000493ffc9 100644 --- a/src/validator_test.cc +++ b/src/validator/validator_test.cc @@ -52,8 +52,8 @@ #include "src/ast/variable.h" #include "src/ast/variable_decl_statement.h" #include "src/type_determiner.h" -#include "src/validator_impl.h" -#include "src/validator_test_helper.h" +#include "src/validator/validator_impl.h" +#include "src/validator/validator_test_helper.h" namespace tint { namespace { diff --git a/src/validator_test_helper.cc b/src/validator/validator_test_helper.cc similarity index 94% rename from src/validator_test_helper.cc rename to src/validator/validator_test_helper.cc index 39c667b5e7..d35efd2e4f 100644 --- a/src/validator_test_helper.cc +++ b/src/validator/validator_test_helper.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/validator_test_helper.h" +#include "src/validator/validator_test_helper.h" #include diff --git a/src/validator_test_helper.h b/src/validator/validator_test_helper.h similarity index 88% rename from src/validator_test_helper.h rename to src/validator/validator_test_helper.h index c5ac6717dd..9e51c3f4c1 100644 --- a/src/validator_test_helper.h +++ b/src/validator/validator_test_helper.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_VALIDATOR_TEST_HELPER_H_ -#define SRC_VALIDATOR_TEST_HELPER_H_ +#ifndef SRC_VALIDATOR_VALIDATOR_TEST_HELPER_H_ +#define SRC_VALIDATOR_VALIDATOR_TEST_HELPER_H_ #include #include "src/ast/type/void_type.h" #include "src/type_determiner.h" -#include "src/validator_impl.h" +#include "src/validator/validator_impl.h" namespace tint { @@ -50,4 +50,4 @@ class ValidatorTestHelper { } // namespace tint -#endif // SRC_VALIDATOR_TEST_HELPER_H_ +#endif // SRC_VALIDATOR_VALIDATOR_TEST_HELPER_H_