<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/Error.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>[ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (#138251)</title>
<updated>2025-05-05T10:10:03+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-05-05T10:10:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b492ec5899082af9f34d79be9750b5e5c5d082e1'/>
<id>b492ec5899082af9f34d79be9750b5e5c5d082e1</id>
<content type='text'>
This implements the result of the discussion at:

https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587

There are two different use cases for report_fatal_error, so replace it
with two functions reportFatalInternalError() and
reportFatalUsageError(). The former indicates a bug in LLVM and
generates a crash dialog. The latter does not. The names have been
suggested by rnk and people seemed to like them.

This replaces a lot of the usages that passed an explicit value for
GenCrashDiag. I did not bulk replace remaining report_fatal_error usage
-- they probably require case by case review for which function to use.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements the result of the discussion at:

https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587

There are two different use cases for report_fatal_error, so replace it
with two functions reportFatalInternalError() and
reportFatalUsageError(). The former indicates a bug in LLVM and
generates a crash dialog. The latter does not. The names have been
suggested by rnk and people seemed to like them.

This replaces a lot of the usages that passed an explicit value for
GenCrashDiag. I did not bulk replace remaining report_fatal_error usage
-- they probably require case by case review for which function to use.</pre>
</div>
</content>
</entry>
<entry>
<title>Add llvm::Error C API, LLVMCantFail</title>
<updated>2024-07-31T16:40:26+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2024-07-31T16:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45ef0d492f7b61613d0833fbf7eafdd41e137139'/>
<id>45ef0d492f7b61613d0833fbf7eafdd41e137139</id>
<content type='text'>
It's barely testable - the test does exercise the code, but wouldn't
fail on an empty implementation. It would cause a memory leak though
(because the error handle wouldn't be unwrapped/reowned) which could be
detected by asan and other leak detectors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's barely testable - the test does exercise the code, but wouldn't
fail on an empty implementation. It would cause a memory leak though
(because the error handle wouldn't be unwrapped/reowned) which could be
detected by asan and other leak detectors.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Error] Add non-consuming toString (#95375)</title>
<updated>2024-06-14T09:35:27+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-06-14T09:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=44df1167f88cabbb4cfde816f279337379ea30b3'/>
<id>44df1167f88cabbb4cfde816f279337379ea30b3</id>
<content type='text'>
There are some places that want to convert an Error to string, but still
retain the original Error object, for example to emit a non-fatal
warning.

This currently isn't possible, because the entire Error infra is
move-based. And what people end up doing in this case is to move the
Error... twice.

This patch introduces a toStringWithoutConsuming() function to
accommodate this use case. This also requires some infrastructure that
allows visiting Errors without consuming them.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some places that want to convert an Error to string, but still
retain the original Error object, for example to emit a non-fatal
warning.

This currently isn't possible, because the entire Error infra is
move-based. And what people end up doing in this case is to move the
Error... twice.

This patch introduces a toStringWithoutConsuming() function to
accommodate this use case. This also requires some infrastructure that
allows visiting Errors without consuming them.</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid std::string -&gt; (char *) roundtrip in createStringError() (NFC) (#93242)</title>
<updated>2024-05-23T23:51:56+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-05-23T23:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9223ccb0e56d6d4de17808e2e4000c8019a9a218'/>
<id>9223ccb0e56d6d4de17808e2e4000c8019a9a218</id>
<content type='text'>
The current API first creates a temporary std::string, then passes it as
a C string, only to then convert it into a std::string for storage, thus
unnecessarily computing the length of the string and copying it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current API first creates a temporary std::string, then passes it as
a C string, only to then convert it into a std::string for storage, thus
unnecessarily computing the length of the string and copying it.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Move StringExtras.h include from Error.h to Error.cpp</title>
<updated>2023-07-13T20:06:39+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-08T09:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3900860b386aa666eb03738d81fdc13afd647925'/>
<id>3900860b386aa666eb03738d81fdc13afd647925</id>
<content type='text'>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D155178
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D155178
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Support] Move StringExtras.h include from Error.h to Error.cpp"</title>
<updated>2023-07-13T08:07:14+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-13T08:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a69707d3ce0bf658c95234f18d4de63325e3c90'/>
<id>0a69707d3ce0bf658c95234f18d4de63325e3c90</id>
<content type='text'>
This reverts commit 5be8c89ed6d959d57ae21c168dc4215ce0d05553.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5be8c89ed6d959d57ae21c168dc4215ce0d05553.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Move StringExtras.h include from Error.h to Error.cpp</title>
<updated>2023-07-13T07:39:59+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-08T09:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5be8c89ed6d959d57ae21c168dc4215ce0d05553'/>
<id>5be8c89ed6d959d57ae21c168dc4215ce0d05553</id>
<content type='text'>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D155018
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D155018
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Support] Move StringExtras.h include from Error.h to Error.cpp"</title>
<updated>2023-07-09T13:25:41+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-09T13:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19551f000913c2519df045d1da09010be942b48d'/>
<id>19551f000913c2519df045d1da09010be942b48d</id>
<content type='text'>
This reverts commit 4c0cfd870f78c3f107b23a2bd61504c8ebc22912.

There are still transitive includes missing inside lldb tools.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4c0cfd870f78c3f107b23a2bd61504c8ebc22912.

There are still transitive includes missing inside lldb tools.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Move StringExtras.h include from Error.h to Error.cpp</title>
<updated>2023-07-09T13:09:58+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-08T09:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4c0cfd870f78c3f107b23a2bd61504c8ebc22912'/>
<id>4c0cfd870f78c3f107b23a2bd61504c8ebc22912</id>
<content type='text'>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D154775
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the implementation of the `toString` function from
`llvm/Support/Error.h` to the source file, which allows us to move
`#include "llvm/ADT/StringExtras.h"` to the source file as well.

As `Error.h` is present in a large number of translation units this
means we are unnecessarily bringing in the contents of
`StringExtras.h` - itself a large file with lots of includes - and
slowing down compilation.

Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
source file as it's no longer needed, but this does not give as much of
a benefit.

This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
reduction of ~0.87%. This should result in a small improvement in
compilation time.

Differential Revision: https://reviews.llvm.org/D154775
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Support] Move StringExtras.h include from Error.h to Error.cpp"</title>
<updated>2023-07-08T19:29:37+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-07-08T19:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d2fb8f2884a922f59e48a6c7758c37342363a5ba'/>
<id>d2fb8f2884a922f59e48a6c7758c37342363a5ba</id>
<content type='text'>
This reverts commit 2e2743b6479c9d90c85a0bf68d83d45c7f9f472d.

More transitive includes of `llvm/ADT/StringExtras.h` need to be
removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2e2743b6479c9d90c85a0bf68d83d45c7f9f472d.

More transitive includes of `llvm/ADT/StringExtras.h` need to be
removed.
</pre>
</div>
</content>
</entry>
</feed>
