[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)
via lldb-commits
lldb-commits at lists.llvm.org
Fri May 2 14:42:03 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- lldb/include/lldb/API/SBSaveCoreOptions.h lldb/include/lldb/Symbol/SaveCoreOptions.h lldb/source/API/SBSaveCoreOptions.cpp lldb/source/Symbol/SaveCoreOptions.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/API/SBSaveCoreOptions.cpp b/lldb/source/API/SBSaveCoreOptions.cpp
index 410fb673b..e101f6a25 100644
--- a/lldb/source/API/SBSaveCoreOptions.cpp
+++ b/lldb/source/API/SBSaveCoreOptions.cpp
@@ -116,14 +116,16 @@ void SBSaveCoreOptions::Clear() {
uint64_t SBSaveCoreOptions::GetCurrentSizeInBytes(SBError &error) {
LLDB_INSTRUMENT_VA(this, error);
- llvm::Expected<uint64_t> expected_bytes = m_opaque_up->GetCurrentSizeInBytes();
+ llvm::Expected<uint64_t> expected_bytes =
+ m_opaque_up->GetCurrentSizeInBytes();
if (!expected_bytes) {
- error = SBError(lldb_private::Status::FromError(expected_bytes.takeError()));
+ error =
+ SBError(lldb_private::Status::FromError(expected_bytes.takeError()));
return 0;
}
// Clear the error, so if the clearer uses it we set it to success.
error.Clear();
- return *expected_bytes;
+ return *expected_bytes;
}
lldb_private::SaveCoreOptions &SBSaveCoreOptions::ref() const {
diff --git a/lldb/source/Symbol/SaveCoreOptions.cpp b/lldb/source/Symbol/SaveCoreOptions.cpp
index 9f4351fd5..e51ae2795 100644
--- a/lldb/source/Symbol/SaveCoreOptions.cpp
+++ b/lldb/source/Symbol/SaveCoreOptions.cpp
@@ -150,7 +150,6 @@ llvm::Expected<uint64_t> SaveCoreOptions::GetCurrentSizeInBytes() {
if (!m_process_sp)
return Status::FromErrorString("Requires a process to be set.").takeError();
-
error = EnsureValidConfiguration(m_process_sp);
if (error.Fail())
return error.takeError();
``````````
</details>
https://github.com/llvm/llvm-project/pull/138169
More information about the lldb-commits
mailing list