[tint] Move common hlsl/writer code to hlsl/writer/common

Breaks a cyclic dependency between hlsl/writer and the subdirectory.

Change-Id: I722df97c96c32b4308210d1828a505d674d29d0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/143800
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index fbf1aac..33aab2c 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -1184,8 +1184,8 @@
   sources = [
     "lang/hlsl/writer/ast_printer/ast_printer.cc",
     "lang/hlsl/writer/ast_printer/ast_printer.h",
-    "lang/hlsl/writer/options.cc",
-    "lang/hlsl/writer/options.h",
+    "lang/hlsl/writer/common/options.cc",
+    "lang/hlsl/writer/common/options.h",
     "lang/hlsl/writer/result.cc",
     "lang/hlsl/writer/result.h",
     "lang/hlsl/writer/writer.cc",
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index 633b411..e50d5fc 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -752,8 +752,8 @@
 
 if(${TINT_BUILD_HLSL_WRITER})
   list(APPEND TINT_LIB_SRCS
-    lang/hlsl/writer/options.cc
-    lang/hlsl/writer/options.h
+    lang/hlsl/writer/common/options.cc
+    lang/hlsl/writer/common/options.h
     lang/hlsl/writer/result.cc
     lang/hlsl/writer/result.h
     lang/hlsl/writer/writer.cc
diff --git a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.h b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.h
index c6e7dce..4136f5b 100644
--- a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.h
+++ b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.h
@@ -22,8 +22,7 @@
 #include <utility>
 
 #include "src/tint/lang/core/builtin/builtin_value.h"
-#include "src/tint/lang/hlsl/writer/options.h"
-#include "src/tint/lang/hlsl/writer/result.h"
+#include "src/tint/lang/hlsl/writer/common/options.h"
 #include "src/tint/lang/wgsl/ast/transform/decompose_memory_access.h"
 #include "src/tint/lang/wgsl/program/program_builder.h"
 #include "src/tint/utils/containers/scope_stack.h"
diff --git a/src/tint/lang/hlsl/writer/ast_printer/test_helper.h b/src/tint/lang/hlsl/writer/ast_printer/test_helper.h
index 3f8a279..51801b7 100644
--- a/src/tint/lang/hlsl/writer/ast_printer/test_helper.h
+++ b/src/tint/lang/hlsl/writer/ast_printer/test_helper.h
@@ -21,7 +21,7 @@
 
 #include "gtest/gtest.h"
 #include "src/tint/lang/hlsl/writer/ast_printer/ast_printer.h"
-#include "src/tint/lang/hlsl/writer/options.h"
+#include "src/tint/lang/hlsl/writer/common/options.h"
 #include "src/tint/lang/wgsl/ast/transform/manager.h"
 #include "src/tint/lang/wgsl/ast/transform/renamer.h"
 #include "src/tint/lang/wgsl/resolver/resolve.h"
diff --git a/src/tint/lang/hlsl/writer/options.cc b/src/tint/lang/hlsl/writer/common/options.cc
similarity index 93%
rename from src/tint/lang/hlsl/writer/options.cc
rename to src/tint/lang/hlsl/writer/common/options.cc
index 989da82..16a6024 100644
--- a/src/tint/lang/hlsl/writer/options.cc
+++ b/src/tint/lang/hlsl/writer/common/options.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/tint/lang/hlsl/writer/options.h"
+#include "src/tint/lang/hlsl/writer/common/options.h"
 
 namespace tint::hlsl::writer {
 
diff --git a/src/tint/lang/hlsl/writer/options.h b/src/tint/lang/hlsl/writer/common/options.h
similarity index 94%
rename from src/tint/lang/hlsl/writer/options.h
rename to src/tint/lang/hlsl/writer/common/options.h
index cb74fa4..5be8c43 100644
--- a/src/tint/lang/hlsl/writer/options.h
+++ b/src/tint/lang/hlsl/writer/common/options.h
@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef SRC_TINT_LANG_HLSL_WRITER_OPTIONS_H_
-#define SRC_TINT_LANG_HLSL_WRITER_OPTIONS_H_
+#ifndef SRC_TINT_LANG_HLSL_WRITER_COMMON_OPTIONS_H_
+#define SRC_TINT_LANG_HLSL_WRITER_COMMON_OPTIONS_H_
 
 #include <bitset>
 #include <optional>
@@ -81,4 +81,4 @@
 
 }  // namespace tint::hlsl::writer
 
-#endif  // SRC_TINT_LANG_HLSL_WRITER_OPTIONS_H_
+#endif  // SRC_TINT_LANG_HLSL_WRITER_COMMON_OPTIONS_H_
diff --git a/src/tint/lang/hlsl/writer/writer.h b/src/tint/lang/hlsl/writer/writer.h
index 3b3bf4a..4c0410b 100644
--- a/src/tint/lang/hlsl/writer/writer.h
+++ b/src/tint/lang/hlsl/writer/writer.h
@@ -15,7 +15,7 @@
 #ifndef SRC_TINT_LANG_HLSL_WRITER_WRITER_H_
 #define SRC_TINT_LANG_HLSL_WRITER_WRITER_H_
 
-#include "src/tint/lang/hlsl/writer/options.h"
+#include "src/tint/lang/hlsl/writer/common/options.h"
 #include "src/tint/lang/hlsl/writer/result.h"
 
 // Forward declarations