Skip to content

Commit 101cf54

Browse files
authored
[lldb] Move definition of SBSaveCoreOptions dtor out of header (#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.
1 parent 2f6a879 commit 101cf54

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lldb/include/lldb/API/SBSaveCoreOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LLDB_API SBSaveCoreOptions {
1717
public:
1818
SBSaveCoreOptions();
1919
SBSaveCoreOptions(const lldb::SBSaveCoreOptions &rhs);
20-
~SBSaveCoreOptions() = default;
20+
~SBSaveCoreOptions();
2121

2222
const SBSaveCoreOptions &operator=(const lldb::SBSaveCoreOptions &rhs);
2323

lldb/source/API/SBSaveCoreOptions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ SBSaveCoreOptions::SBSaveCoreOptions(const SBSaveCoreOptions &rhs) {
2929
m_opaque_up = clone(rhs.m_opaque_up);
3030
}
3131

32+
SBSaveCoreOptions::~SBSaveCoreOptions() = default;
33+
3234
const SBSaveCoreOptions &
3335
SBSaveCoreOptions::operator=(const SBSaveCoreOptions &rhs) {
3436
LLDB_INSTRUMENT_VA(this, rhs);

0 commit comments

Comments
 (0)