[tint] Extract out string conversion utils from utils/text
Breaks a cyclic dependency
Change-Id: If00681f1ee0b2fccc36140b19882eae9ebc90048
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/143781
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/utils/cli/cli.h b/src/tint/utils/cli/cli.h
index 05f9c1f..5f72859 100644
--- a/src/tint/utils/cli/cli.h
+++ b/src/tint/utils/cli/cli.h
@@ -24,7 +24,7 @@
#include "src/tint/utils/macros/compiler.h"
#include "src/tint/utils/memory/block_allocator.h"
#include "src/tint/utils/result/result.h"
-#include "src/tint/utils/text/parse_num.h"
+#include "src/tint/utils/strconv/parse_num.h"
#include "src/tint/utils/text/string.h"
namespace tint::cli {
diff --git a/src/tint/utils/text/float_to_string.cc b/src/tint/utils/strconv/float_to_string.cc
similarity index 98%
rename from src/tint/utils/text/float_to_string.cc
rename to src/tint/utils/strconv/float_to_string.cc
index 462af68..904058d 100644
--- a/src/tint/utils/text/float_to_string.cc
+++ b/src/tint/utils/strconv/float_to_string.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/utils/text/float_to_string.h"
+#include "src/tint/utils/strconv/float_to_string.h"
#include <cmath>
#include <cstring>
diff --git a/src/tint/utils/text/float_to_string.h b/src/tint/utils/strconv/float_to_string.h
similarity index 92%
rename from src/tint/utils/text/float_to_string.h
rename to src/tint/utils/strconv/float_to_string.h
index dd4a2a3..783bff3 100644
--- a/src/tint/utils/text/float_to_string.h
+++ b/src/tint/utils/strconv/float_to_string.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_UTILS_TEXT_FLOAT_TO_STRING_H_
-#define SRC_TINT_UTILS_TEXT_FLOAT_TO_STRING_H_
+#ifndef SRC_TINT_UTILS_STRCONV_FLOAT_TO_STRING_H_
+#define SRC_TINT_UTILS_STRCONV_FLOAT_TO_STRING_H_
#include <string>
@@ -47,4 +47,4 @@
} // namespace tint::writer
-#endif // SRC_TINT_UTILS_TEXT_FLOAT_TO_STRING_H_
+#endif // SRC_TINT_UTILS_STRCONV_FLOAT_TO_STRING_H_
diff --git a/src/tint/utils/text/float_to_string_test.cc b/src/tint/utils/strconv/float_to_string_test.cc
similarity index 99%
rename from src/tint/utils/text/float_to_string_test.cc
rename to src/tint/utils/strconv/float_to_string_test.cc
index 4b54b80..c2347ce 100644
--- a/src/tint/utils/text/float_to_string_test.cc
+++ b/src/tint/utils/strconv/float_to_string_test.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/utils/text/float_to_string.h"
+#include "src/tint/utils/strconv/float_to_string.h"
#include <math.h>
#include <cstring>
diff --git a/src/tint/utils/text/parse_num.cc b/src/tint/utils/strconv/parse_num.cc
similarity index 98%
rename from src/tint/utils/text/parse_num.cc
rename to src/tint/utils/strconv/parse_num.cc
index 4b2fac1..824e5a2 100644
--- a/src/tint/utils/text/parse_num.cc
+++ b/src/tint/utils/strconv/parse_num.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/tint/utils/text/parse_num.h"
+#include "src/tint/utils/strconv/parse_num.h"
#include <charconv>
diff --git a/src/tint/utils/text/parse_num.h b/src/tint/utils/strconv/parse_num.h
similarity index 96%
rename from src/tint/utils/text/parse_num.h
rename to src/tint/utils/strconv/parse_num.h
index b0416a8..17a8c6b 100644
--- a/src/tint/utils/text/parse_num.h
+++ b/src/tint/utils/strconv/parse_num.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TINT_UTILS_TEXT_PARSE_NUM_H_
-#define SRC_TINT_UTILS_TEXT_PARSE_NUM_H_
+#ifndef SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_
+#define SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_
#include <optional>
#include <string>
@@ -130,4 +130,4 @@
} // namespace tint
-#endif // SRC_TINT_UTILS_TEXT_PARSE_NUM_H_
+#endif // SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_