diff options
author | Nikita Popov <npopov@redhat.com> | 2025-05-05 12:10:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-05 12:10:03 +0200 |
commit | b492ec5899082af9f34d79be9750b5e5c5d082e1 (patch) | |
tree | fbf33cfd2104f16d3a847c9cf6d02575b3318042 /llvm/lib/LTO/LTOBackend.cpp | |
parent | 3416d4fcee01b63002b95774e9aff35a0ab8ef9e (diff) | |
download | llvm-b492ec5899082af9f34d79be9750b5e5c5d082e1.zip llvm-b492ec5899082af9f34d79be9750b5e5c5d082e1.tar.gz llvm-b492ec5899082af9f34d79be9750b5e5c5d082e1.tar.bz2 |
[ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (#138251)
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.
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index dd9197e..8a85ac8 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -195,7 +195,7 @@ static void RegisterPassPlugins(ArrayRef<std::string> PassPlugins, for (auto &PluginFN : PassPlugins) { auto PassPlugin = PassPlugin::Load(PluginFN); if (!PassPlugin) - report_fatal_error(PassPlugin.takeError(), /*gen_crash_diag=*/false); + reportFatalUsageError(PassPlugin.takeError()); PassPlugin->registerPassBuilderCallbacks(PB); } } |