diff options
author | Fangrui Song <i@maskray.me> | 2025-03-30 22:03:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-30 22:03:14 -0700 |
commit | 04a67528d303ac4be7943b2ae57222f9c9fd509a (patch) | |
tree | d19bad10d00a421c1794f313556e8c5368738df4 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c9095aa3103460c967fd5ee5dcc695284793ef3c (diff) | |
download | llvm-04a67528d303ac4be7943b2ae57222f9c9fd509a.zip llvm-04a67528d303ac4be7943b2ae57222f9c9fd509a.tar.gz llvm-04a67528d303ac4be7943b2ae57222f9c9fd509a.tar.bz2 |
[MC] Simplify MCBinaryExpr/MCUnaryExpr printing by reducing parentheses (#133674)
The existing pretty printer generates excessive parentheses for
MCBinaryExpr expressions. This update removes unnecessary parentheses
of MCBinaryExpr with +/- operators and MCUnaryExpr.
Since relocatable expressions only use + and -, this change improves
readability in most cases.
Examples:
- (SymA - SymB) + C now prints as SymA - SymB + C.
This updates the output of -fexperimental-relative-c++-abi-vtables for
AArch64 and x86 to `.long _ZN1B3fooEv@PLT-_ZTV1B-8`
- expr + (MCTargetExpr) now prints as expr + MCTargetExpr, with this
change primarily affecting AMDGPUMCExpr.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions