[llvm-branch-commits] [llvm] [MC] Rewrite stdin.s to use python (PR #157232)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 8 09:22:43 PDT 2025
================
@@ -0,0 +1,17 @@
+# RUN: echo "// comment" > %t.input
+# RUN: which llvm-mc | %python %s %t
+
+import subprocess
+import sys
+
+llvm_mc_binary = sys.stdin.readlines()[0].strip()
+temp_file = sys.argv[1]
+input_file = temp_file + ".input"
+
+with open(temp_file, "w") as mc_stdout:
+ mc_stdout.seek(4)
----------------
ilovepi wrote:
Can we get a comment here about the seek being the property under test?
Cribbing from the original commit:
```
## We need to test that starting on an input stream that is not at offset 0 would trigger the
assert in WinCOFFObjectWriter.cpp
```
https://github.com/llvm/llvm-project/pull/157232
More information about the llvm-branch-commits
mailing list