[llvm] [Utils][update_mc_test_checks] Handle double quotes in asm source (PR #175161)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 9 04:23:56 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD llvm/utils/update_mc_test_checks.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- update_mc_test_checks.py	2026-01-09 12:17:54.000000 +0000
+++ update_mc_test_checks.py	2026-01-09 12:23:23.955571 +0000
@@ -36,11 +36,13 @@
 
 def invoke_tool(exe, check_rc, cmd_args, testline, verbose=False):
     substs = SUBSTITUTIONS + [(t, exe) for t in mc_LIKE_TOOLS]
     args = [common.applySubstitutions(cmd, substs) for cmd in cmd_args.split("|")]
 
-    cmd = 'echo "' + testline.replace('"', '\\"') + '" | ' + exe + " " + " | ".join(args)
+    cmd = (
+        'echo "' + testline.replace('"', '\\"') + '" | ' + exe + " " + " | ".join(args)
+    )
     if verbose:
         print("Command: ", cmd)
 
     out = subprocess.run(
         cmd,

``````````

</details>


https://github.com/llvm/llvm-project/pull/175161


More information about the llvm-commits mailing list