[PATCH] D146851: [support] Revise ScopedPrinter formatting tests for floats

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 15:56:48 PDT 2023


paulkirth created this revision.
paulkirth added reviewers: jhenderson, ro, abhina.sreeskantharajan, dyung.
Herald added a subscriber: fedor.sergeev.
Herald added a project: All.
paulkirth requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previously there were several attempts to make the format checks for NaN
and Inf work across platforms, like AIX and Solaris, that print these
values slightly differently. This resulted in a number of forward fixes,
until we finally disabled the tests for NaN and Inf. This change should
make the test robust across different platforms, and reduce the overall
amount of code by delegating to helper functions that use the same
format strings as the implementations used by PrintNumber().

This additionally reverts commit 5a9bad171be5dfdf9430a0f6cbff14d29ca54181 <https://reviews.llvm.org/rG5a9bad171be5dfdf9430a0f6cbff14d29ca54181>
and fa56e362af475e0758cfb41c42f78db50da7235c <https://reviews.llvm.org/rGfa56e362af475e0758cfb41c42f78db50da7235c>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146851

Files:
  llvm/unittests/Support/ScopedPrinterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146851.508236.patch
Type: text/x-patch
Size: 5415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/0a3227b6/attachment.bin>


More information about the llvm-commits mailing list