Skip to content

Commit

Permalink
Merge pull request llvm#9962 from swiftlang/llvm/mdfield-print-to-202…
Browse files Browse the repository at this point in the history
…40723

[llvm][AsmWriter] Don't skip zero-valued DwarfEnum MDField when ShouldSkipZero is not set
  • Loading branch information
adrian-prantl authored Feb 6, 2025
2 parents d882188 + 640d5bd commit 9c34ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/IR/AsmWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ void MDFieldPrinter::printNameTableKind(StringRef Name,
template <class IntTy, class Stringifier>
void MDFieldPrinter::printDwarfEnum(StringRef Name, IntTy Value,
Stringifier toString, bool ShouldSkipZero) {
if (!Value)
if (ShouldSkipZero && !Value)
return;

Out << FS << Name << ": ";
Expand Down

0 comments on commit 9c34ca1

Please sign in to comment.