Commit 102b7cb
Automerge: [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
llvm/llvm-project#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).1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2004 | 2004 | | |
2005 | 2005 | | |
2006 | 2006 | | |
2007 | | - | |
| 2007 | + | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | 2010 | | |
| |||
0 commit comments