Skip to content

Do not emit trailing whitespace on blank lines - #9052

Merged
tlively merged 1 commit into
mainfrom
no-print-empty-lines
Aug 28, 2026
Merged

Do not emit trailing whitespace on blank lines#9052
tlively merged 1 commit into
mainfrom
no-print-empty-lines

Conversation

@tlively

@tlively tlively commented Aug 27, 2026

Copy link
Copy Markdown
Member
  • In printWrap, avoid printing trailing spaces before newlines and on empty lines.
  • Remove whitespace indentation before closing parentheses on raw string literal tool descriptions in wasm-opt and wasm-reduce.
  • In printStackIR, skip Pop pseudo-instructions before emitting indentation so that they do not produce empty lines with indentation.

The version of filecheck we currently use handles whitespace-only lines fine, but LLVM FileCheck and newer versions of Python filecheck require explicit {{^ +$}} regex matchers for such lines. It's nicer to just not emit whitespace-only lines in the first place if we want to upgrade our version of filecheck.

- In printWrap, avoid printing trailing spaces before newlines and on empty lines.
- Remove whitespace indentation before closing parentheses on raw string literal tool descriptions in wasm-opt and wasm-reduce.
- In printStackIR, skip Pop pseudo-instructions before emitting indentation so that they do not produce empty lines with indentation.

The version of filecheck we currently use handles whitespace-only lines fine, but LLVM FileCheck and newer versions of Python filecheck require explicit `{{^ +$}}` regex matchers for such lines. It's nicer to just not emit whitespace-only lines in the first place if we want to upgrade our version of filecheck.
@tlively
tlively requested a review from a team as a code owner August 27, 2026 23:29
@tlively
tlively requested review from aheejin and removed request for a team August 27, 2026 23:29
@tlively
tlively merged commit cdfda07 into main Aug 28, 2026
16 checks passed
@tlively
tlively deleted the no-print-empty-lines branch August 28, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants