[Lldb-commits] [lldb] f74f32b - [lldb][bytecode] Remove "Generated with" comment (#189704)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 31 09:46:20 PDT 2026
Author: Dave Lee
Date: 2026-03-31T16:46:09Z
New Revision: f74f32b529c35531198621fd104cde5d2cf77e0c
URL: https://github.com/llvm/llvm-project/commit/f74f32b529c35531198621fd104cde5d2cf77e0c
DIFF: https://github.com/llvm/llvm-project/commit/f74f32b529c35531198621fd104cde5d2cf77e0c.diff
LOG: [lldb][bytecode] Remove "Generated with" comment (#189704)
In most cases, some other script/tool will call the compiler, and it's
the invocation of that script that ought to be documented in the output.
Added:
Modified:
lldb/examples/python/formatter_bytecode.py
lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
Removed:
################################################################################
diff --git a/lldb/examples/python/formatter_bytecode.py b/lldb/examples/python/formatter_bytecode.py
index 2e31dca68e157..1f9b3f4488c26 100644
--- a/lldb/examples/python/formatter_bytecode.py
+++ b/lldb/examples/python/formatter_bytecode.py
@@ -1152,11 +1152,6 @@ def _main():
help="disassemble bytecode",
)
parser.add_argument("-n", "--type-name", help="source type of formatter")
- parser.add_argument(
- "--skip-invocation-comment",
- action="store_true",
- help="do not print invocation comment in compiled output",
- )
parser.add_argument(
"-o",
"--output",
@@ -1198,9 +1193,6 @@ def _main():
else:
mode = "a" if args.append else "w"
with open(args.output, mode) as output:
- if not args.skip_invocation_comment:
- print("// Generated with:", file=output)
- print("// ", shlex.join(sys.argv), file=output)
section.write_source(output, language=args.format)
elif args.assemble:
if not args.type_name:
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test b/lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
index aff0ff13d031c..248c4c348b009 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
@@ -1,6 +1,6 @@
# RUN: mkdir -p %t
-# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --compile %s --format c --type-name RigidArray --output %t/c-output.txt --skip-invocation-comment
-# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --compile %s --format swift --type-name RigidArray --output %t/swift-output.txt --skip-invocation-comment
+# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --compile %s --format c --type-name RigidArray --output %t/c-output.txt
+# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --compile %s --format swift --type-name RigidArray --output %t/swift-output.txt
# RUN:
diff -u --strip-trailing-cr %S/Inputs/FormatterBytecode/RigidArrayLLDBFormatterC.txt %t/c-output.txt
# RUN:
diff -u --strip-trailing-cr %S/Inputs/FormatterBytecode/RigidArrayLLDBFormatterSwift.txt %t/swift-output.txt
import lldb
More information about the lldb-commits
mailing list