[libcxx-commits] [libcxx] [libcxx] Work around picolibc argv handling in tests. (PR #127662)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 19 05:18:45 PST 2025
================
@@ -274,23 +274,38 @@ def hasAnyLocale(config, locales):
%{exec} -- this means that the command may be executed on a remote host
depending on the %{exec} substitution.
"""
- program = """
+
+ # Convert the locale names into C string literals, by escaping \
+ # and " and wrapping each one in double quotes.
+ name_string_literals = ", ".join(
+ '"' + locale.replace("\\", r"\\").replace('"', r"\"") + '"'
----------------
ldionne wrote:
Just out of curiosity, do you have an example of a locale that contains a `"` or a `\`?
https://github.com/llvm/llvm-project/pull/127662
More information about the libcxx-commits
mailing list