Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Aug 9, 2024

Backport 101cf54

Requested by: @bulbazord

@llvmbot llvmbot requested a review from JDevlieghere as a code owner August 9, 2024 20:38
@llvmbot llvmbot added this to the LLVM 19.X Release milestone Aug 9, 2024
@llvmbot
Copy link
Member Author

llvmbot commented Aug 9, 2024

@clayborg What do you think about merging this PR to the release branch?

@llvmbot
Copy link
Member Author

llvmbot commented Aug 9, 2024

@llvm/pr-subscribers-lldb

Author: None (llvmbot)

Changes

Backport 101cf54

Requested by: @bulbazord


Full diff: https://github.com/llvm/llvm-project/pull/102680.diff

2 Files Affected:

  • (modified) lldb/include/lldb/API/SBSaveCoreOptions.h (+1-1)
  • (modified) lldb/source/API/SBSaveCoreOptions.cpp (+2)
diff --git a/lldb/include/lldb/API/SBSaveCoreOptions.h b/lldb/include/lldb/API/SBSaveCoreOptions.h
index e77496bd3a4a0d..75506fd752e762 100644
--- a/lldb/include/lldb/API/SBSaveCoreOptions.h
+++ b/lldb/include/lldb/API/SBSaveCoreOptions.h
@@ -17,7 +17,7 @@ class LLDB_API SBSaveCoreOptions {
 public:
   SBSaveCoreOptions();
   SBSaveCoreOptions(const lldb::SBSaveCoreOptions &rhs);
-  ~SBSaveCoreOptions() = default;
+  ~SBSaveCoreOptions();
 
   const SBSaveCoreOptions &operator=(const lldb::SBSaveCoreOptions &rhs);
 
diff --git a/lldb/source/API/SBSaveCoreOptions.cpp b/lldb/source/API/SBSaveCoreOptions.cpp
index 6c3f74596203d6..19ca83f932bcf1 100644
--- a/lldb/source/API/SBSaveCoreOptions.cpp
+++ b/lldb/source/API/SBSaveCoreOptions.cpp
@@ -29,6 +29,8 @@ SBSaveCoreOptions::SBSaveCoreOptions(const SBSaveCoreOptions &rhs) {
   m_opaque_up = clone(rhs.m_opaque_up);
 }
 
+SBSaveCoreOptions::~SBSaveCoreOptions() = default;
+
 const SBSaveCoreOptions &
 SBSaveCoreOptions::operator=(const SBSaveCoreOptions &rhs) {
   LLDB_INSTRUMENT_VA(this, rhs);

…102539)

This class is technically not usable in its current state. When you use
it in a simple C++ project, your compiler will complain about an
incomplete definition of SaveCoreOptions. Normally this isn't a problem,
other classes in the SBAPI do this. The difference is that
SBSaveCoreOptions has a default destructor in the header, so the
compiler will attempt to generate the code for the destructor with an
incomplete definition of the impl type.

All methods for every class, including constructors and destructors,
must have a separate implementation not in a header.

(cherry picked from commit 101cf54)
@tru tru merged commit e908a00 into llvm:release/19.x Aug 10, 2024
@github-actions
Copy link

@bulbazord (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

4 participants