[shuffle] Move writer/spirv to new structure

This CL moves the SPIR-V writer into the `lang/spirv/ast_writer`
directory and updates the includes. The namespaces and build groups
are not updated in this CL, just the code move.

The IR version of the SPIR-V writer is moved into `lang/spirv/writer`.

Bug: tint:1988
Change-Id: I81a1a4e1ff5a6e3af567a6bd5dde572ef02bc2f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/142027
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index cbc920e..029bb7b 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -656,23 +656,23 @@
 
 if(${TINT_BUILD_SPV_WRITER})
   list(APPEND TINT_LIB_SRCS
-    writer/spirv/binary_writer.cc
-    writer/spirv/binary_writer.h
-    writer/spirv/builder.cc
-    writer/spirv/builder.h
-    writer/spirv/function.cc
-    writer/spirv/function.h
-    writer/spirv/generator.cc
-    writer/spirv/generator.h
-    writer/spirv/generator_impl.cc
-    writer/spirv/generator_impl.h
-    writer/spirv/instruction.cc
-    writer/spirv/instruction.h
-    writer/spirv/module.cc
-    writer/spirv/module.h
-    writer/spirv/operand.cc
-    writer/spirv/operand.h
-    writer/spirv/scalar_constant.h
+    lang/spirv/ast_writer/binary_writer.cc
+    lang/spirv/ast_writer/binary_writer.h
+    lang/spirv/ast_writer/builder.cc
+    lang/spirv/ast_writer/builder.h
+    lang/spirv/ast_writer/function.cc
+    lang/spirv/ast_writer/function.h
+    lang/spirv/ast_writer/generator.cc
+    lang/spirv/ast_writer/generator.h
+    lang/spirv/ast_writer/generator_impl.cc
+    lang/spirv/ast_writer/generator_impl.h
+    lang/spirv/ast_writer/instruction.cc
+    lang/spirv/ast_writer/instruction.h
+    lang/spirv/ast_writer/module.cc
+    lang/spirv/ast_writer/module.h
+    lang/spirv/ast_writer/operand.cc
+    lang/spirv/ast_writer/operand.h
+    lang/spirv/ast_writer/scalar_constant.h
   )
 
   if(${TINT_BUILD_IR})
@@ -689,8 +689,8 @@
       ir/transform/shader_io_spirv.h
       ir/transform/var_for_dynamic_index.cc
       ir/transform/var_for_dynamic_index.h
-      writer/spirv/ir/generator_impl_ir.cc
-      writer/spirv/ir/generator_impl_ir.h
+      lang/spirv/writer/generator_impl_ir.cc
+      lang/spirv/writer/generator_impl_ir.h
     )
   endif()
 endif()
@@ -1299,40 +1299,40 @@
 
   if(${TINT_BUILD_SPV_WRITER})
     list(APPEND TINT_TEST_SRCS
-      writer/spirv/binary_writer_test.cc
-      writer/spirv/builder_accessor_expression_test.cc
-      writer/spirv/builder_assign_test.cc
-      writer/spirv/builder_binary_expression_test.cc
-      writer/spirv/builder_bitcast_expression_test.cc
-      writer/spirv/builder_block_test.cc
-      writer/spirv/builder_builtin_test.cc
-      writer/spirv/builder_builtin_texture_test.cc
-      writer/spirv/builder_call_test.cc
-      writer/spirv/builder_const_assert_test.cc
-      writer/spirv/builder_constructor_expression_test.cc
-      writer/spirv/builder_discard_test.cc
-      writer/spirv/builder_entry_point_test.cc
-      writer/spirv/builder_format_conversion_test.cc
-      writer/spirv/builder_function_attribute_test.cc
-      writer/spirv/builder_function_test.cc
-      writer/spirv/builder_function_variable_test.cc
-      writer/spirv/builder_global_variable_test.cc
-      writer/spirv/builder_ident_expression_test.cc
-      writer/spirv/builder_if_test.cc
-      writer/spirv/builder_literal_test.cc
-      writer/spirv/builder_loop_test.cc
-      writer/spirv/builder_return_test.cc
-      writer/spirv/builder_switch_test.cc
-      writer/spirv/builder_test.cc
-      writer/spirv/builder_type_test.cc
-      writer/spirv/builder_unary_op_expression_test.cc
-      writer/spirv/instruction_test.cc
-      writer/spirv/module_test.cc
-      writer/spirv/operand_test.cc
-      writer/spirv/scalar_constant_test.cc
-      writer/spirv/spv_dump.cc
-      writer/spirv/spv_dump.h
-      writer/spirv/test_helper.h
+      lang/spirv/ast_writer/binary_writer_test.cc
+      lang/spirv/ast_writer/builder_accessor_expression_test.cc
+      lang/spirv/ast_writer/builder_assign_test.cc
+      lang/spirv/ast_writer/builder_binary_expression_test.cc
+      lang/spirv/ast_writer/builder_bitcast_expression_test.cc
+      lang/spirv/ast_writer/builder_block_test.cc
+      lang/spirv/ast_writer/builder_builtin_test.cc
+      lang/spirv/ast_writer/builder_builtin_texture_test.cc
+      lang/spirv/ast_writer/builder_call_test.cc
+      lang/spirv/ast_writer/builder_const_assert_test.cc
+      lang/spirv/ast_writer/builder_constructor_expression_test.cc
+      lang/spirv/ast_writer/builder_discard_test.cc
+      lang/spirv/ast_writer/builder_entry_point_test.cc
+      lang/spirv/ast_writer/builder_format_conversion_test.cc
+      lang/spirv/ast_writer/builder_function_attribute_test.cc
+      lang/spirv/ast_writer/builder_function_test.cc
+      lang/spirv/ast_writer/builder_function_variable_test.cc
+      lang/spirv/ast_writer/builder_global_variable_test.cc
+      lang/spirv/ast_writer/builder_ident_expression_test.cc
+      lang/spirv/ast_writer/builder_if_test.cc
+      lang/spirv/ast_writer/builder_literal_test.cc
+      lang/spirv/ast_writer/builder_loop_test.cc
+      lang/spirv/ast_writer/builder_return_test.cc
+      lang/spirv/ast_writer/builder_switch_test.cc
+      lang/spirv/ast_writer/builder_test.cc
+      lang/spirv/ast_writer/builder_type_test.cc
+      lang/spirv/ast_writer/builder_unary_op_expression_test.cc
+      lang/spirv/ast_writer/instruction_test.cc
+      lang/spirv/ast_writer/module_test.cc
+      lang/spirv/ast_writer/operand_test.cc
+      lang/spirv/ast_writer/scalar_constant_test.cc
+      lang/spirv/ast_writer/spv_dump.cc
+      lang/spirv/ast_writer/spv_dump.h
+      lang/spirv/ast_writer/test_helper.h
     )
 
     if(${TINT_BUILD_IR})
@@ -1343,27 +1343,27 @@
         ir/transform/merge_return_test.cc
         ir/transform/shader_io_spirv_test.cc
         ir/transform/var_for_dynamic_index_test.cc
-        writer/spirv/ir/generator_impl_ir_access_test.cc
-        writer/spirv/ir/generator_impl_ir_atomic_builtin_test.cc
-        writer/spirv/ir/generator_impl_ir_binary_test.cc
-        writer/spirv/ir/generator_impl_ir_bitcast_test.cc
-        writer/spirv/ir/generator_impl_ir_builtin_test.cc
-        writer/spirv/ir/generator_impl_ir_constant_test.cc
-        writer/spirv/ir/generator_impl_ir_construct_test.cc
-        writer/spirv/ir/generator_impl_ir_convert_test.cc
-        writer/spirv/ir/generator_impl_ir_discard_test.cc
-        writer/spirv/ir/generator_impl_ir_function_test.cc
-        writer/spirv/ir/generator_impl_ir_if_test.cc
-        writer/spirv/ir/generator_impl_ir_let_test.cc
-        writer/spirv/ir/generator_impl_ir_loop_test.cc
-        writer/spirv/ir/generator_impl_ir_switch_test.cc
-        writer/spirv/ir/generator_impl_ir_swizzle_test.cc
-        writer/spirv/ir/generator_impl_ir_test.cc
-        writer/spirv/ir/generator_impl_ir_texture_builtin_test.cc
-        writer/spirv/ir/generator_impl_ir_type_test.cc
-        writer/spirv/ir/generator_impl_ir_unary_test.cc
-        writer/spirv/ir/generator_impl_ir_var_test.cc
-        writer/spirv/ir/test_helper_ir.h
+        lang/spirv/writer/generator_impl_ir_access_test.cc
+        lang/spirv/writer/generator_impl_ir_atomic_builtin_test.cc
+        lang/spirv/writer/generator_impl_ir_binary_test.cc
+        lang/spirv/writer/generator_impl_ir_bitcast_test.cc
+        lang/spirv/writer/generator_impl_ir_builtin_test.cc
+        lang/spirv/writer/generator_impl_ir_constant_test.cc
+        lang/spirv/writer/generator_impl_ir_construct_test.cc
+        lang/spirv/writer/generator_impl_ir_convert_test.cc
+        lang/spirv/writer/generator_impl_ir_discard_test.cc
+        lang/spirv/writer/generator_impl_ir_function_test.cc
+        lang/spirv/writer/generator_impl_ir_if_test.cc
+        lang/spirv/writer/generator_impl_ir_let_test.cc
+        lang/spirv/writer/generator_impl_ir_loop_test.cc
+        lang/spirv/writer/generator_impl_ir_switch_test.cc
+        lang/spirv/writer/generator_impl_ir_swizzle_test.cc
+        lang/spirv/writer/generator_impl_ir_test.cc
+        lang/spirv/writer/generator_impl_ir_texture_builtin_test.cc
+        lang/spirv/writer/generator_impl_ir_type_test.cc
+        lang/spirv/writer/generator_impl_ir_unary_test.cc
+        lang/spirv/writer/generator_impl_ir_var_test.cc
+        lang/spirv/writer/test_helper_ir.h
       )
     endif()
   endif()
@@ -1724,7 +1724,7 @@
     list(APPEND TINT_BENCHMARK_SRCS lang/msl/ast_writer/generator_bench.cc)
   endif()
   if (${TINT_BUILD_SPV_WRITER})
-    list(APPEND TINT_BENCHMARK_SRCS writer/spirv/generator_bench.cc)
+    list(APPEND TINT_BENCHMARK_SRCS lang/spirv/ast_writer/generator_bench.cc)
   endif()
   if (${TINT_BUILD_WGSL_WRITER})
     list(APPEND TINT_BENCHMARK_SRCS lang/wgsl/ast_writer/generator_bench.cc)