aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2025-02-06 18:55:50 +0000
committerGitHub <noreply@github.com>2025-02-06 18:55:50 +0000
commit5492199a9aa4b5d31c38e36928ac153570091d6d (patch)
treedd3048a2744f8f4127c7d3f7a88ea7874fda1e3d /llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
parentf4e3b8783cb9eb9a442b14ec8ce7356fa6853387 (diff)
downloadllvm-5492199a9aa4b5d31c38e36928ac153570091d6d.zip
llvm-5492199a9aa4b5d31c38e36928ac153570091d6d.tar.gz
llvm-5492199a9aa4b5d31c38e36928ac153570091d6d.tar.bz2
[llvm][AsmWriter] Don't skip zero-valued DwarfEnum MDField when ShouldSkipZero is not set (#126044)
I ran into this while working on a different patch where I'm emitting a zero-valued DWARF enum field which shouldn't be skipped. This patch checks the (currently unused) `ShouldSkipZero` before deciding to skip printing this field. Based on git history this seems like an oversight from the initial refactor that introduced this. We have a similar check in `printInt`. Wasn't sure how to best test this, but tests in an upcoming patch rely on this functionality (see https://github.com/llvm/llvm-project/pull/126045). Currently the only place `ShouldSkipZero` is set to `false` is when emitting the `DW_LANG_` enum. But the language codes start at `0x1`. So it never exercised this codepath (and we should probably just make it not pass this parameter).
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp')
0 files changed, 0 insertions, 0 deletions