[shuffle] Move inspector to new structure.
This CL moves the inspector folder into the `lang/wgsl/inspector` folder
and updates the includes. The namespaces and build groups are not updated
in this CL, just the code move.
Bug: tint:1988
Change-Id: I6ed67d93aac0a39b894cf683feb708fc4a413eb4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/142165
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/include/tint/tint.h b/include/tint/tint.h
index ae157f3..5a91cec 100644
--- a/include/tint/tint.h
+++ b/include/tint/tint.h
@@ -23,13 +23,13 @@
#include "src/tint/core/diagnostic/printer.h"
#include "src/tint/core/unicode.h"
-#include "src/tint/inspector/inspector.h"
#include "src/tint/lang/base/type/manager.h"
#include "src/tint/lang/wgsl/ast/transform/first_index_offset.h"
#include "src/tint/lang/wgsl/ast/transform/renamer.h"
#include "src/tint/lang/wgsl/ast/transform/single_entry_point.h"
#include "src/tint/lang/wgsl/ast/transform/substitute_override.h"
#include "src/tint/lang/wgsl/ast/transform/vertex_pulling.h"
+#include "src/tint/lang/wgsl/inspector/inspector.h"
#include "src/tint/reader/reader.h"
#include "src/tint/transform/manager.h"
#include "src/tint/writer/array_length_from_uniform_options.h"
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index b9d54d7..d8462a5 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -334,14 +334,14 @@
libtint_source_set("libtint_inspector_src") {
sources = [
- "inspector/entry_point.cc",
- "inspector/entry_point.h",
- "inspector/inspector.cc",
- "inspector/inspector.h",
- "inspector/resource_binding.cc",
- "inspector/resource_binding.h",
- "inspector/scalar.cc",
- "inspector/scalar.h",
+ "lang/wgsl/inspector/entry_point.cc",
+ "lang/wgsl/inspector/entry_point.h",
+ "lang/wgsl/inspector/inspector.cc",
+ "lang/wgsl/inspector/inspector.h",
+ "lang/wgsl/inspector/resource_binding.cc",
+ "lang/wgsl/inspector/resource_binding.h",
+ "lang/wgsl/inspector/scalar.cc",
+ "lang/wgsl/inspector/scalar.h",
]
deps = [
":libtint_ast_src",
@@ -1689,11 +1689,11 @@
tint_unittests_source_set("tint_unittests_inspector_src") {
sources = [
- "inspector/inspector_test.cc",
- "inspector/test_inspector_builder.cc",
- "inspector/test_inspector_builder.h",
- "inspector/test_inspector_runner.cc",
- "inspector/test_inspector_runner.h",
+ "lang/wgsl/inspector/inspector_test.cc",
+ "lang/wgsl/inspector/test_inspector_builder.cc",
+ "lang/wgsl/inspector/test_inspector_builder.h",
+ "lang/wgsl/inspector/test_inspector_runner.cc",
+ "lang/wgsl/inspector/test_inspector_runner.h",
]
deps = [ ":libtint_inspector_src" ]
}
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index 4de9c9a..2526ab5 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -252,14 +252,14 @@
lang/base/constant/node.h
lang/base/constant/value.cc
lang/base/constant/value.h
- inspector/entry_point.cc
- inspector/entry_point.h
- inspector/inspector.cc
- inspector/inspector.h
- inspector/resource_binding.cc
- inspector/resource_binding.h
- inspector/scalar.cc
- inspector/scalar.h
+ lang/wgsl/inspector/entry_point.cc
+ lang/wgsl/inspector/entry_point.h
+ lang/wgsl/inspector/inspector.cc
+ lang/wgsl/inspector/inspector.h
+ lang/wgsl/inspector/resource_binding.cc
+ lang/wgsl/inspector/resource_binding.h
+ lang/wgsl/inspector/scalar.cc
+ lang/wgsl/inspector/scalar.h
program_builder.cc
program_builder.h
program_id.cc
@@ -1176,11 +1176,11 @@
# Inspector tests depend on WGSL reader
if(${TINT_BUILD_WGSL_READER})
list(APPEND TINT_TEST_SRCS
- inspector/inspector_test.cc
- inspector/test_inspector_builder.cc
- inspector/test_inspector_builder.h
- inspector/test_inspector_runner.cc
- inspector/test_inspector_runner.h
+ lang/wgsl/inspector/inspector_test.cc
+ lang/wgsl/inspector/test_inspector_builder.cc
+ lang/wgsl/inspector/test_inspector_builder.h
+ lang/wgsl/inspector/test_inspector_runner.cc
+ lang/wgsl/inspector/test_inspector_runner.h
)
endif()
diff --git a/src/tint/fuzzers/tint_concurrency_fuzzer.cc b/src/tint/fuzzers/tint_concurrency_fuzzer.cc
index 942da74..ac14f47 100644
--- a/src/tint/fuzzers/tint_concurrency_fuzzer.cc
+++ b/src/tint/fuzzers/tint_concurrency_fuzzer.cc
@@ -21,11 +21,11 @@
#include "src/tint/core/hash.h"
#include "src/tint/fuzzers/apply_substitute_overrides.h"
-#include "src/tint/inspector/inspector.h"
#include "src/tint/lang/glsl/ast_writer/generator.h"
#include "src/tint/lang/hlsl/ast_writer/generator.h"
#include "src/tint/lang/msl/ast_writer/generator.h"
#include "src/tint/lang/wgsl/ast_writer/generator.h"
+#include "src/tint/lang/wgsl/inspector/inspector.h"
#include "src/tint/lang/wgsl/reader/parser.h"
#include "src/tint/writer/flatten_bindings.h"
#include "src/tint/writer/spirv/generator.h"
diff --git a/src/tint/inspector/entry_point.cc b/src/tint/lang/wgsl/inspector/entry_point.cc
similarity index 95%
rename from src/tint/inspector/entry_point.cc
rename to src/tint/lang/wgsl/inspector/entry_point.cc
index cf39df2..bc5275c 100644
--- a/src/tint/inspector/entry_point.cc
+++ b/src/tint/lang/wgsl/inspector/entry_point.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/entry_point.h"
+#include "src/tint/lang/wgsl/inspector/entry_point.h"
namespace tint::inspector {
diff --git a/src/tint/inspector/entry_point.h b/src/tint/lang/wgsl/inspector/entry_point.h
similarity index 96%
rename from src/tint/inspector/entry_point.h
rename to src/tint/lang/wgsl/inspector/entry_point.h
index 94cfc2c..f3616af 100644
--- a/src/tint/inspector/entry_point.h
+++ b/src/tint/lang/wgsl/inspector/entry_point.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_ENTRY_POINT_H_
-#define SRC_TINT_INSPECTOR_ENTRY_POINT_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_ENTRY_POINT_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_ENTRY_POINT_H_
#include <optional>
#include <string>
@@ -165,4 +165,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_ENTRY_POINT_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_ENTRY_POINT_H_
diff --git a/src/tint/inspector/inspector.cc b/src/tint/lang/wgsl/inspector/inspector.cc
similarity index 99%
rename from src/tint/inspector/inspector.cc
rename to src/tint/lang/wgsl/inspector/inspector.cc
index fd141b6..1505e97 100644
--- a/src/tint/inspector/inspector.cc
+++ b/src/tint/lang/wgsl/inspector/inspector.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/inspector.h"
+#include "src/tint/lang/wgsl/inspector/inspector.h"
#include <limits>
#include <utility>
diff --git a/src/tint/inspector/inspector.h b/src/tint/lang/wgsl/inspector/inspector.h
similarity index 97%
rename from src/tint/inspector/inspector.h
rename to src/tint/lang/wgsl/inspector/inspector.h
index c1a4248..ffb3237 100644
--- a/src/tint/inspector/inspector.h
+++ b/src/tint/lang/wgsl/inspector/inspector.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_INSPECTOR_H_
-#define SRC_TINT_INSPECTOR_INSPECTOR_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_INSPECTOR_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_INSPECTOR_H_
#include <map>
#include <memory>
@@ -26,10 +26,10 @@
#include "tint/override_id.h"
#include "src/tint/core/unique_vector.h"
-#include "src/tint/inspector/entry_point.h"
-#include "src/tint/inspector/resource_binding.h"
-#include "src/tint/inspector/scalar.h"
#include "src/tint/lang/base/builtin/builtin_value.h"
+#include "src/tint/lang/wgsl/inspector/entry_point.h"
+#include "src/tint/lang/wgsl/inspector/resource_binding.h"
+#include "src/tint/lang/wgsl/inspector/scalar.h"
#include "src/tint/lang/wgsl/sem/sampler_texture_pair.h"
#include "src/tint/program.h"
@@ -250,4 +250,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_INSPECTOR_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_INSPECTOR_H_
diff --git a/src/tint/inspector/inspector_test.cc b/src/tint/lang/wgsl/inspector/inspector_test.cc
similarity index 99%
rename from src/tint/inspector/inspector_test.cc
rename to src/tint/lang/wgsl/inspector/inspector_test.cc
index 4a29596..9e956c4 100644
--- a/src/tint/inspector/inspector_test.cc
+++ b/src/tint/lang/wgsl/inspector/inspector_test.cc
@@ -14,8 +14,6 @@
#include "gmock/gmock.h"
-#include "src/tint/inspector/test_inspector_builder.h"
-#include "src/tint/inspector/test_inspector_runner.h"
#include "src/tint/lang/base/type/depth_texture.h"
#include "src/tint/lang/base/type/external_texture.h"
#include "src/tint/lang/base/type/multisampled_texture.h"
@@ -26,6 +24,8 @@
#include "src/tint/lang/wgsl/ast/id_attribute.h"
#include "src/tint/lang/wgsl/ast/stage_attribute.h"
#include "src/tint/lang/wgsl/ast/workgroup_attribute.h"
+#include "src/tint/lang/wgsl/inspector/test_inspector_builder.h"
+#include "src/tint/lang/wgsl/inspector/test_inspector_runner.h"
#include "src/tint/lang/wgsl/sem/variable.h"
#include "src/tint/program_builder.h"
#include "tint/tint.h"
diff --git a/src/tint/inspector/resource_binding.cc b/src/tint/lang/wgsl/inspector/resource_binding.cc
similarity index 98%
rename from src/tint/inspector/resource_binding.cc
rename to src/tint/lang/wgsl/inspector/resource_binding.cc
index ba0846e..3ed0acf 100644
--- a/src/tint/inspector/resource_binding.cc
+++ b/src/tint/lang/wgsl/inspector/resource_binding.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/resource_binding.h"
+#include "src/tint/lang/wgsl/inspector/resource_binding.h"
#include "src/tint/lang/base/type/array.h"
#include "src/tint/lang/base/type/f32.h"
diff --git a/src/tint/inspector/resource_binding.h b/src/tint/lang/wgsl/inspector/resource_binding.h
similarity index 95%
rename from src/tint/inspector/resource_binding.h
rename to src/tint/lang/wgsl/inspector/resource_binding.h
index b6682d8..966e099 100644
--- a/src/tint/inspector/resource_binding.h
+++ b/src/tint/lang/wgsl/inspector/resource_binding.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_RESOURCE_BINDING_H_
-#define SRC_TINT_INSPECTOR_RESOURCE_BINDING_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_RESOURCE_BINDING_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_RESOURCE_BINDING_H_
#include <cstdint>
@@ -125,4 +125,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_RESOURCE_BINDING_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_RESOURCE_BINDING_H_
diff --git a/src/tint/inspector/scalar.cc b/src/tint/lang/wgsl/inspector/scalar.cc
similarity index 96%
rename from src/tint/inspector/scalar.cc
rename to src/tint/lang/wgsl/inspector/scalar.cc
index b0b139f..c8cfb2d 100644
--- a/src/tint/inspector/scalar.cc
+++ b/src/tint/lang/wgsl/inspector/scalar.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/scalar.h"
+#include "src/tint/lang/wgsl/inspector/scalar.h"
namespace tint::inspector {
diff --git a/src/tint/inspector/scalar.h b/src/tint/lang/wgsl/inspector/scalar.h
similarity index 93%
rename from src/tint/inspector/scalar.h
rename to src/tint/lang/wgsl/inspector/scalar.h
index 1470b30..c16ce43 100644
--- a/src/tint/inspector/scalar.h
+++ b/src/tint/lang/wgsl/inspector/scalar.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_SCALAR_H_
-#define SRC_TINT_INSPECTOR_SCALAR_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_SCALAR_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_SCALAR_H_
#include <cstdint>
@@ -75,4 +75,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_SCALAR_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_SCALAR_H_
diff --git a/src/tint/inspector/test_inspector_builder.cc b/src/tint/lang/wgsl/inspector/test_inspector_builder.cc
similarity index 99%
rename from src/tint/inspector/test_inspector_builder.cc
rename to src/tint/lang/wgsl/inspector/test_inspector_builder.cc
index 6511ef6..6b657b3 100644
--- a/src/tint/inspector/test_inspector_builder.cc
+++ b/src/tint/lang/wgsl/inspector/test_inspector_builder.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/test_inspector_builder.h"
+#include "src/tint/lang/wgsl/inspector/test_inspector_builder.h"
#include <memory>
#include <string>
diff --git a/src/tint/inspector/test_inspector_builder.h b/src/tint/lang/wgsl/inspector/test_inspector_builder.h
similarity index 98%
rename from src/tint/inspector/test_inspector_builder.h
rename to src/tint/lang/wgsl/inspector/test_inspector_builder.h
index 52fcba5..7eb2a03 100644
--- a/src/tint/inspector/test_inspector_builder.h
+++ b/src/tint/lang/wgsl/inspector/test_inspector_builder.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
-#define SRC_TINT_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
#include <memory>
#include <string>
@@ -337,4 +337,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_BUILDER_H_
diff --git a/src/tint/inspector/test_inspector_runner.cc b/src/tint/lang/wgsl/inspector/test_inspector_runner.cc
similarity index 94%
rename from src/tint/inspector/test_inspector_runner.cc
rename to src/tint/lang/wgsl/inspector/test_inspector_runner.cc
index 9b88ac8..38306e3 100644
--- a/src/tint/inspector/test_inspector_runner.cc
+++ b/src/tint/lang/wgsl/inspector/test_inspector_runner.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/inspector/test_inspector_runner.h"
+#include "src/tint/lang/wgsl/inspector/test_inspector_runner.h"
namespace tint::inspector {
diff --git a/src/tint/inspector/test_inspector_runner.h b/src/tint/lang/wgsl/inspector/test_inspector_runner.h
similarity index 88%
rename from src/tint/inspector/test_inspector_runner.h
rename to src/tint/lang/wgsl/inspector/test_inspector_runner.h
index 6d46725..80dce6e 100644
--- a/src/tint/inspector/test_inspector_runner.h
+++ b/src/tint/lang/wgsl/inspector/test_inspector_runner.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
-#define SRC_TINT_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
+#ifndef SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
+#define SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
#include <memory>
#include <string>
@@ -46,4 +46,4 @@
} // namespace tint::inspector
-#endif // SRC_TINT_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
+#endif // SRC_TINT_LANG_WGSL_INSPECTOR_TEST_INSPECTOR_RUNNER_H_
diff --git a/src/tint/writer/flatten_bindings.cc b/src/tint/writer/flatten_bindings.cc
index d514bdc..34c6c64 100644
--- a/src/tint/writer/flatten_bindings.cc
+++ b/src/tint/writer/flatten_bindings.cc
@@ -16,8 +16,8 @@
#include <utility>
-#include "src/tint/inspector/inspector.h"
#include "src/tint/lang/wgsl/ast/transform/binding_remapper.h"
+#include "src/tint/lang/wgsl/inspector/inspector.h"
#include "src/tint/transform/manager.h"
#include "src/tint/writer/binding_point.h"