Move ir_program_test to program_to_ir folder.
The `ir_program_test` helper is only used in `program_to_ir`. Move it
directly into that folder from the `helpers` folder.
Change-Id: I76f30f84ff7a16a3b27e66ac64cea0977eb8114f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/192521
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/wgsl/helpers/BUILD.bazel b/src/tint/lang/wgsl/helpers/BUILD.bazel
index c43af56..5e1862a 100644
--- a/src/tint/lang/wgsl/helpers/BUILD.bazel
+++ b/src/tint/lang/wgsl/helpers/BUILD.bazel
@@ -86,18 +86,12 @@
"append_vector_test.cc",
"check_supported_extensions_test.cc",
"flatten_bindings_test.cc",
- ] + select({
- ":tint_build_wgsl_reader": [
- "ir_program_test.h",
- ],
- "//conditions:default": [],
- }),
+ ],
deps = [
"//src/tint/api/common",
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/intrinsic",
- "//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
@@ -107,7 +101,6 @@
"//src/tint/lang/wgsl/helpers",
"//src/tint/lang/wgsl/intrinsic",
"//src/tint/lang/wgsl/program",
- "//src/tint/lang/wgsl/reader/lower",
"//src/tint/lang/wgsl/resolver",
"//src/tint/lang/wgsl/sem",
"//src/tint/utils/containers",
@@ -124,19 +117,8 @@
"//src/tint/utils/text",
"//src/tint/utils/traits",
"@gtest",
- ] + select({
- ":tint_build_wgsl_reader": [
- "//src/tint/lang/wgsl/reader",
- "//src/tint/lang/wgsl/reader/program_to_ir",
- ],
- "//conditions:default": [],
- }),
+ ],
copts = COPTS,
visibility = ["//visibility:public"],
)
-alias(
- name = "tint_build_wgsl_reader",
- actual = "//src/tint:tint_build_wgsl_reader_true",
-)
-
diff --git a/src/tint/lang/wgsl/helpers/BUILD.cmake b/src/tint/lang/wgsl/helpers/BUILD.cmake
index f76d258..061dbfd 100644
--- a/src/tint/lang/wgsl/helpers/BUILD.cmake
+++ b/src/tint/lang/wgsl/helpers/BUILD.cmake
@@ -91,7 +91,6 @@
tint_lang_core
tint_lang_core_constant
tint_lang_core_intrinsic
- tint_lang_core_ir
tint_lang_core_type
tint_lang_wgsl
tint_lang_wgsl_ast
@@ -101,7 +100,6 @@
tint_lang_wgsl_helpers
tint_lang_wgsl_intrinsic
tint_lang_wgsl_program
- tint_lang_wgsl_reader_lower
tint_lang_wgsl_resolver
tint_lang_wgsl_sem
tint_utils_containers
@@ -122,13 +120,3 @@
tint_target_add_external_dependencies(tint_lang_wgsl_helpers_test test
"gtest"
)
-
-if(TINT_BUILD_WGSL_READER)
- tint_target_add_sources(tint_lang_wgsl_helpers_test test
- "lang/wgsl/helpers/ir_program_test.h"
- )
- tint_target_add_dependencies(tint_lang_wgsl_helpers_test test
- tint_lang_wgsl_reader
- tint_lang_wgsl_reader_program_to_ir
- )
-endif(TINT_BUILD_WGSL_READER)
diff --git a/src/tint/lang/wgsl/helpers/BUILD.gn b/src/tint/lang/wgsl/helpers/BUILD.gn
index 91edc4b..09cdf36 100644
--- a/src/tint/lang/wgsl/helpers/BUILD.gn
+++ b/src/tint/lang/wgsl/helpers/BUILD.gn
@@ -93,7 +93,6 @@
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/constant",
"${tint_src_dir}/lang/core/intrinsic",
- "${tint_src_dir}/lang/core/ir",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/wgsl",
"${tint_src_dir}/lang/wgsl/ast",
@@ -103,7 +102,6 @@
"${tint_src_dir}/lang/wgsl/helpers",
"${tint_src_dir}/lang/wgsl/intrinsic",
"${tint_src_dir}/lang/wgsl/program",
- "${tint_src_dir}/lang/wgsl/reader/lower",
"${tint_src_dir}/lang/wgsl/resolver",
"${tint_src_dir}/lang/wgsl/sem",
"${tint_src_dir}/utils/containers",
@@ -120,13 +118,5 @@
"${tint_src_dir}/utils/text",
"${tint_src_dir}/utils/traits",
]
-
- if (tint_build_wgsl_reader) {
- sources += [ "ir_program_test.h" ]
- deps += [
- "${tint_src_dir}/lang/wgsl/reader",
- "${tint_src_dir}/lang/wgsl/reader/program_to_ir",
- ]
- }
}
}
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel
index 551faa8..4b1a500 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel
+++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel
@@ -84,6 +84,7 @@
"builtin_test.cc",
"call_test.cc",
"function_test.cc",
+ "ir_program_test.h",
"let_test.cc",
"literal_test.cc",
"materialize_test.cc",
@@ -103,7 +104,6 @@
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/common",
"//src/tint/lang/wgsl/features",
- "//src/tint/lang/wgsl/helpers:test",
"//src/tint/lang/wgsl/program",
"//src/tint/lang/wgsl/reader/lower",
"//src/tint/lang/wgsl/resolver",
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake
index 1c43bfe..b8f2a72 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake
+++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake
@@ -87,6 +87,7 @@
lang/wgsl/reader/program_to_ir/builtin_test.cc
lang/wgsl/reader/program_to_ir/call_test.cc
lang/wgsl/reader/program_to_ir/function_test.cc
+ lang/wgsl/reader/program_to_ir/ir_program_test.h
lang/wgsl/reader/program_to_ir/let_test.cc
lang/wgsl/reader/program_to_ir/literal_test.cc
lang/wgsl/reader/program_to_ir/materialize_test.cc
@@ -107,7 +108,6 @@
tint_lang_wgsl_ast
tint_lang_wgsl_common
tint_lang_wgsl_features
- tint_lang_wgsl_helpers_test
tint_lang_wgsl_program
tint_lang_wgsl_reader_lower
tint_lang_wgsl_resolver
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn
index 41ff6f8..7bc014b 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn
+++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn
@@ -86,6 +86,7 @@
"builtin_test.cc",
"call_test.cc",
"function_test.cc",
+ "ir_program_test.h",
"let_test.cc",
"literal_test.cc",
"materialize_test.cc",
@@ -106,7 +107,6 @@
"${tint_src_dir}/lang/wgsl/ast",
"${tint_src_dir}/lang/wgsl/common",
"${tint_src_dir}/lang/wgsl/features",
- "${tint_src_dir}/lang/wgsl/helpers:unittests",
"${tint_src_dir}/lang/wgsl/program",
"${tint_src_dir}/lang/wgsl/reader/lower",
"${tint_src_dir}/lang/wgsl/resolver",
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/accessor_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/accessor_test.cc
index 0530639..2c94788 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/accessor_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/accessor_test.cc
@@ -32,7 +32,7 @@
#include "src/tint/lang/core/ir/var.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/binary_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/binary_test.cc
index 662de7b..0e2595d 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/binary_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/binary_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/builtin_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/builtin_test.cc
index ab4b650..b51a00f 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/builtin_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/builtin_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/call_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/call_test.cc
index f8342c8..5959752 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/call_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/call_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/function_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/function_test.cc
index 2ace620e..b9d4bbd 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/function_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/function_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/helpers/ir_program_test.h b/src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h
similarity index 94%
rename from src/tint/lang/wgsl/helpers/ir_program_test.h
rename to src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h
index 5468ebc..c6f78cc 100644
--- a/src/tint/lang/wgsl/helpers/ir_program_test.h
+++ b/src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h
@@ -25,10 +25,8 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// GEN_BUILD:CONDITION(tint_build_wgsl_reader)
-
-#ifndef SRC_TINT_LANG_WGSL_HELPERS_IR_PROGRAM_TEST_H_
-#define SRC_TINT_LANG_WGSL_HELPERS_IR_PROGRAM_TEST_H_
+#ifndef SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_IR_PROGRAM_TEST_H_
+#define SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_IR_PROGRAM_TEST_H_
#include <memory>
#include <string>
@@ -101,4 +99,4 @@
} // namespace tint::wgsl::helpers
-#endif // SRC_TINT_LANG_WGSL_HELPERS_IR_PROGRAM_TEST_H_
+#endif // SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_IR_PROGRAM_TEST_H_
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/let_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/let_test.cc
index 761e584..d296d16 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/let_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/let_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/literal_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/literal_test.cc
index e56a0c6..f6c6169 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/literal_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/literal_test.cc
@@ -33,7 +33,7 @@
#include "src/tint/lang/core/ir/var.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
using namespace tint::core::fluent_types; // NOLINT
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/materialize_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/materialize_test.cc
index f09beb8..7f3ae1c 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/materialize_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/materialize_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir_test.cc
index 3e8e597..dc57142 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir_test.cc
@@ -36,7 +36,7 @@
#include "src/tint/lang/core/ir/switch.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
using namespace tint::core::fluent_types; // NOLINT
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/shadowing_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/shadowing_test.cc
index 6803cd6..c3bcff5 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/shadowing_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/shadowing_test.cc
@@ -32,7 +32,7 @@
#include "src/tint/lang/core/ir/var.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/store_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/store_test.cc
index b8c04a3..4d7e15d 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/store_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/store_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/unary_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/unary_test.cc
index dbf7b24..e50dcb5 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/unary_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/unary_test.cc
@@ -25,11 +25,10 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
-
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/var_test.cc b/src/tint/lang/wgsl/reader/program_to_ir/var_test.cc
index 16cf0c9..65f2b6b 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/var_test.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/var_test.cc
@@ -29,7 +29,7 @@
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/wgsl/ast/case_selector.h"
#include "src/tint/lang/wgsl/ast/int_literal_expression.h"
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"
namespace tint::wgsl::reader {
namespace {