aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
authordrazi <fengxie83@gmail.com>2025-05-13 16:03:06 +0800
committerGitHub <noreply@github.com>2025-05-13 10:03:06 +0200
commiteea1e50ac281d667992aa74c1819cd80b8eb634f (patch)
tree1a7a3d10f1a7f697b5d0ca7cdb7a416b1ce6732e /llvm/lib/CodeGen/MachineRegisterInfo.cpp
parentf92dd0083e8b635e1084cb01dfcc3424ba844d76 (diff)
downloadllvm-eea1e50ac281d667992aa74c1819cd80b8eb634f.zip
llvm-eea1e50ac281d667992aa74c1819cd80b8eb634f.tar.gz
llvm-eea1e50ac281d667992aa74c1819cd80b8eb634f.tar.bz2
[mlir-tblgen] trim method body to empty with only spaces to avoid crash (#139568)
method body or default impl must be true empty. Even they contain only spaces, ``mlir-tblgen`` considers they are non-empty and generates invalid code lead to segment fault. It's very hard to debug. ```c++ InterfaceMethod< ... /*methodBody=*/ [{ }], // This must be true empty. Leaving a space here can lead to segment fault which is hard to figure out why /*defaultImpl=*/ [{ ... }] ``` This PR trim spaces when method body or default implementation of interface method is not empty. Now ``mlir-tblgen`` generates valid code even when they contain only spaces. --------- Co-authored-by: Fung Xie <ftse@nvidia.com> Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
0 files changed, 0 insertions, 0 deletions