<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Utility/Scalar.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LLDB] Fix operators &lt;= and &gt;= returning a wrong result when comparing to a floating point NaN (#108060)</title>
<updated>2024-09-18T12:50:09+00:00</updated>
<author>
<name>Ilia Kuklin</name>
<email>ikuklin@accesssoftek.com</email>
</author>
<published>2024-09-18T12:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9690b30ba9acc3deb1068deb37f3b507826b27fe'/>
<id>9690b30ba9acc3deb1068deb37f3b507826b27fe</id>
<content type='text'>
Implement operators `&lt;=` and `&gt;=` to explicitly check the comparison
results to be `cmpLessThan` or `cmpEqual` instead of negating the result
of `operators&lt;`.

Fixes #85947</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement operators `&lt;=` and `&gt;=` to explicitly check the comparison
results to be `cmpLessThan` or `cmpEqual` instead of negating the result
of `operators&lt;`.

Fixes #85947</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Make conversions from llvm::Error explicit with Status::FromEr… (#107163)</title>
<updated>2024-09-05T19:19:31+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-09-05T19:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a0dd90eb7dc318c9b3fccb9ba02e1e22fb073094'/>
<id>a0dd90eb7dc318c9b3fccb9ba02e1e22fb073094</id>
<content type='text'>
…ror() [NFC]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…ror() [NFC]</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Turn lldb_private::Status into a value type. (#106163)</title>
<updated>2024-08-27T17:59:31+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-08-27T17:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0642cd768b80665585c8500bed2933a3b99123dc'/>
<id>0642cd768b80665585c8500bed2933a3b99123dc</id>
<content type='text'>
This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

`    ResultTy DoFoo(Status&amp; error)
`
to

`    llvm::Expected&lt;ResultTy&gt; DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

`    ResultTy DoFoo(Status&amp; error)
`
to

`    llvm::Expected&lt;ResultTy&gt; DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove dead code block (NFC) (#94775)</title>
<updated>2024-06-15T18:09:58+00:00</updated>
<author>
<name>Shivam Gupta</name>
<email>shivam98.tkg@gmail.com</email>
</author>
<published>2024-06-15T18:09:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef01c75d467df92b8c659307595aa74ed2290cd8'/>
<id>ef01c75d467df92b8c659307595aa74ed2290cd8</id>
<content type='text'>
The check that max_bit_pos == sign_bit_pos conflicts with the check that
sign_bit_pos &lt; max_bit_pos in the block surrounding it.

Originally found by cppcheck - 
lldb/source/Utility/Scalar.cpp:756:23: warning: Opposite inner 'if'
condition leads to a dead code block. [oppositeInnerCondition]

Fixes #85985</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The check that max_bit_pos == sign_bit_pos conflicts with the check that
sign_bit_pos &lt; max_bit_pos in the block surrounding it.

Originally found by cppcheck - 
lldb/source/Utility/Scalar.cpp:756:23: warning: Opposite inner 'if'
condition leads to a dead code block. [oppositeInnerCondition]

Fixes #85985</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix Scalar::GetData for non-multiple-of-8-bits values (#90846)</title>
<updated>2024-05-03T07:07:20+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-05-03T07:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e450f987286b983328e0b9e65630b656dec291de'/>
<id>e450f987286b983328e0b9e65630b656dec291de</id>
<content type='text'>
It was aligning the byte size down. Now it aligns up. This manifested
itself as SBTypeStaticField::GetConstantValue returning a zero-sized
value for `bool` fields (because clang represents bool as a 1-bit
value).

I've changed the code for float Scalars as well, although I'm not aware
of floating point values that are not multiples of 8 bits.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was aligning the byte size down. Now it aligns up. This manifested
itself as SBTypeStaticField::GetConstantValue returning a zero-sized
value for `bool` fields (because clang represents bool as a 1-bit
value).

I've changed the code for float Scalars as well, although I'm not aware
of floating point values that are not multiples of 8 bits.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Add APFloat helper functions to Scalar class. (#86862)</title>
<updated>2024-03-29T04:39:58+00:00</updated>
<author>
<name>cmtice</name>
<email>cmtice@google.com</email>
</author>
<published>2024-03-29T04:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba6b2d22af177a72b132cdb8e9350a708f282d2c'/>
<id>ba6b2d22af177a72b132cdb8e9350a708f282d2c</id>
<content type='text'>
This adds the ability to create a Scalar from an APFloat, and to create
an APFloat from an APSInt or another APFloat.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the ability to create a Scalar from an APFloat, and to create
an APFloat from an APSInt or another APFloat.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Scalar::GetValue() should take a Stream by reference (#69231)</title>
<updated>2023-10-17T22:40:51+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-10-17T22:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=170b552136f845ffc4267c8728629b6b6b19518d'/>
<id>170b552136f845ffc4267c8728629b6b6b19518d</id>
<content type='text'>
This function always expects the pointer to be valid, a reference seems
more appropriate.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function always expects the pointer to be valid, a reference seems
more appropriate.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add missing StringExtras.h includes</title>
<updated>2023-07-09T13:09:21+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-06-17T12:18:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5551657b310b0f5f97b26288f87bc41a8050bf93'/>
<id>5551657b310b0f5f97b26288f87bc41a8050bf93</id>
<content type='text'>
In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includes that were previously included transitively
through this header.

This is fixing all files missed in b0abd4893fa1, 39d8e6e22cd1, and
a11efd49266f.

Differential Revision: https://reviews.llvm.org/D154775
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includes that were previously included transitively
through this header.

This is fixing all files missed in b0abd4893fa1, 39d8e6e22cd1, and
a11efd49266f.

Differential Revision: https://reviews.llvm.org/D154775
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate away from the soft-deprecated functions in APInt.h (NFC)</title>
<updated>2023-02-20T08:58:29+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-02-20T08:58:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5e111eb275eee3bec1123b4b85606328017e5ee5'/>
<id>5e111eb275eee3bec1123b4b85606328017e5ee5</id>
<content type='text'>
Note that those functions on the left hand side are soft-deprecated in
favor of those on the right hand side:

  getMinSignedBits -&gt; getSignificantBits
  getNullValue     -&gt; getZero
  isNullValue      -&gt; isZero
  isOneValue       -&gt; isOne
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that those functions on the left hand side are soft-deprecated in
favor of those on the right hand side:

  getMinSignedBits -&gt; getSignificantBits
  getNullValue     -&gt; getZero
  isNullValue      -&gt; isZero
  isOneValue       -&gt; isOne
</pre>
</div>
</content>
</entry>
<entry>
<title>[APInt] Normalize naming on keep constructors / predicate methods.</title>
<updated>2021-09-09T16:50:24+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-09-09T05:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=735f46715d90fd0ff48dd44d1007302640ab4d11'/>
<id>735f46715d90fd0ff48dd44d1007302640ab4d11</id>
<content type='text'>
This renames the primary methods for creating a zero value to `getZero`
instead of `getNullValue` and renames predicates like `isAllOnesValue`
to simply `isAllOnes`.  This achieves two things:

1) This starts standardizing predicates across the LLVM codebase,
   following (in this case) ConstantInt.  The word "Value" doesn't
   convey anything of merit, and is missing in some of the other things.

2) Calling an integer "null" doesn't make any sense.  The original sin
   here is mine and I've regretted it for years.  This moves us to calling
   it "zero" instead, which is correct!

APInt is widely used and I don't think anyone is keen to take massive source
breakage on anything so core, at least not all in one go.  As such, this
doesn't actually delete any entrypoints, it "soft deprecates" them with a
comment.

Included in this patch are changes to a bunch of the codebase, but there are
more.  We should normalize SelectionDAG and other APIs as well, which would
make the API change more mechanical.

Differential Revision: https://reviews.llvm.org/D109483
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This renames the primary methods for creating a zero value to `getZero`
instead of `getNullValue` and renames predicates like `isAllOnesValue`
to simply `isAllOnes`.  This achieves two things:

1) This starts standardizing predicates across the LLVM codebase,
   following (in this case) ConstantInt.  The word "Value" doesn't
   convey anything of merit, and is missing in some of the other things.

2) Calling an integer "null" doesn't make any sense.  The original sin
   here is mine and I've regretted it for years.  This moves us to calling
   it "zero" instead, which is correct!

APInt is widely used and I don't think anyone is keen to take massive source
breakage on anything so core, at least not all in one go.  As such, this
doesn't actually delete any entrypoints, it "soft deprecates" them with a
comment.

Included in this patch are changes to a bunch of the codebase, but there are
more.  We should normalize SelectionDAG and other APIs as well, which would
make the API change more mechanical.

Differential Revision: https://reviews.llvm.org/D109483
</pre>
</div>
</content>
</entry>
</feed>
