History log of /llvm-project/llvm/unittests/Support/ScopedPrinterTest.cpp (Results 1 – 12 of 12)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# 77bab2a6 13-Sep-2024 JOE1994 <joseph942010@gmail.com>

[llvm][unittests] Strip unneeded use of raw_string_ostream::str() (NFC)

Avoid unneeded layer of indirection.


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1
# f331e13d 24-Mar-2023 Paul Kirth <paulkirth@google.com>

[support] Revise ScopedPrinter formatting tests for floats

Previously there were several attempts to make the format checks for NaN
and Inf work across platforms, like AIX and Solaris, that print th

[support] Revise ScopedPrinter formatting tests for floats

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
and fa56e362af475e0758cfb41c42f78db50da7235c.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D146851

show more ...


# 5a9bad17 24-Mar-2023 Kazu Hirata <kazu@google.com>

[Support] Fix warnings

This patch fixes:

llvm/unittests/Support/ScopedPrinterTest.cpp:519:20: error: unused
variable 'InfDouble' [-Werror,-Wunused-variable]

llvm/unittests/Support/ScopedPrin

[Support] Fix warnings

This patch fixes:

llvm/unittests/Support/ScopedPrinterTest.cpp:519:20: error: unused
variable 'InfDouble' [-Werror,-Wunused-variable]

llvm/unittests/Support/ScopedPrinterTest.cpp:520:16: error: unused
variable 'NaNDouble' [-Werror,-Wunused-variable]

llvm/unittests/Support/ScopedPrinterTest.cpp:516:15: error: unused
variable 'NaNFloat' [-Werror,-Wunused-variable]

llvm/unittests/Support/ScopedPrinterTest.cpp:515:19: error: unused
variable 'InfFloat' [-Werror,-Wunused-variable]

Since commit fa56e362af475e0758cfb41c42f78db50da7235c has temporarily
disabled tests involving these constants, this patch simply comments
them out instead of removing them.

show more ...


# fa56e362 24-Mar-2023 Paul Kirth <paulkirth@google.com>

[support] Temporarily disable Inf/NaN testing in PrintNumber

This is still breaking on some platforms. The underlying implementation
doesn't seem to be the cause, rather the test is not robust acros

[support] Temporarily disable Inf/NaN testing in PrintNumber

This is still breaking on some platforms. The underlying implementation
doesn't seem to be the cause, rather the test is not robust across
platforms. So, we'll just disable this for the time being, to unblock
builds until we have a proper fix.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D146834

show more ...


# 6d5845c5 24-Mar-2023 Paul Kirth <paulkirth@google.com>

[support] Attempt to fix PrintNumber test for Solaris

NaN and Inf are still causing some problems in a formatting test.
This patch makes the checked format string exactly match the internal
JSON for

[support] Attempt to fix PrintNumber test for Solaris

NaN and Inf are still causing some problems in a formatting test.
This patch makes the checked format string exactly match the internal
JSON format string. If there are still problems, we should disable
testing Inf and NaN values until we can come to a portable solution.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D146818

show more ...


# 8088f5bf 23-Mar-2023 Paul Kirth <paulkirth@google.com>

[support] Fix PrintNumber Test on AIX

When fixing the test earlier, we missed the JSON case for NaN and INF,
so handle those the same as for non-JSON, by creating the string
dynamically.

Reviewed B

[support] Fix PrintNumber Test on AIX

When fixing the test earlier, we missed the JSON case for NaN and INF,
so handle those the same as for non-JSON, by creating the string
dynamically.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D146739

show more ...


# c819257b 21-Mar-2023 Paul Kirth <paulkirth@google.com>

[llvm][support] Fix ScopedPrinterTest on AIX

The test strings we used for infinity and NAN were not correct on AIX.
This patch creates those dynamically instead of hard-coded.

Reviewed By: abhina.s

[llvm][support] Fix ScopedPrinterTest on AIX

The test strings we used for infinity and NAN were not correct on AIX.
This patch creates those dynamically instead of hard-coded.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D146542

show more ...


# 89359df8 18-Mar-2023 Paul Kirth <paulkirth@google.com>

[support] Support printing floats in ScopedPrinter

llvm-readobj will need the ability to print floats for use in
HashHistograms. This adds that functionality to the ScopedPrinter and
JSONScopedPrint

[support] Support printing floats in ScopedPrinter

llvm-readobj will need the ability to print floats for use in
HashHistograms. This adds that functionality to the ScopedPrinter and
JSONScopedPrinter.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D145277

show more ...


# 93c1a5f3 18-Mar-2023 Paul Kirth <paulkirth@google.com>

[llvm-readobj] Rename JSON Flag fields to be more consistent

Today the JSON uses `Value` and `RawValue` when printing `Flags`, when really
the `Value` field is always the name of an Enum variant, an

[llvm-readobj] Rename JSON Flag fields to be more consistent

Today the JSON uses `Value` and `RawValue` when printing `Flags`, when really
the `Value` field is always the name of an Enum variant, and `RawValue` is its
underlying numeric value. Similarly, we rename the `RawFlags` key to `Value`,
to match the new scheme. This also allows JSON parsing to use consistent logic
for `Flag` types.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D137091

show more ...


Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 38818b60 04-Jan-2023 serge-sans-paille <sguelton@mozilla.com>

Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part

Use deduction guides instead of helper functions.

The only non-automatic changes have been:

1. ArrayRef(some_uint8_pointer, 0

Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part

Use deduction guides instead of helper functions.

The only non-automatic changes have been:

1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*))
2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase.
3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated.
4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that).

Per reviewers' comment, some useless makeArrayRef have been removed in the process.

This is a follow-up to https://reviews.llvm.org/D140896 that introduced
the deduction guides.

Differential Revision: https://reviews.llvm.org/D140955

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 928d1725 10-Dec-2021 Jayson Yan <jaysonyan@google.com>

[llvm] Add JSONScopedPrinter class

This change adds a JSONScopedPrinter as a subclass to ScopedPrinter.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D114224


# d25a6503 10-Dec-2021 Jayson Yan <jaysonyan@google.com>

[llvm] Add ScopedPrinter unit tests

Add unit tests for the ScopedPrinter class.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D114684