Author: Laszlo Kindrat
Date: 2023-05-26T09:25:44-04:00
New Revision: d01917c507a3b195109001d1b9a91c4fbdbb5a71

URL: 
https://github.com/llvm/llvm-project/commit/d01917c507a3b195109001d1b9a91c4fbdbb5a71
DIFF: 
https://github.com/llvm/llvm-project/commit/d01917c507a3b195109001d1b9a91c4fbdbb5a71.diff

LOG: [LLDB] Explicitly declare constructor in `PersistentExpressionState`

It seems that when trying to link the lldb library explicitly, the inlined 
default constructor cannot find the vtable for the class. This patch fixes this 
by explicitly declaring a default constructor in `PersistentExpressionState`, 
and providing the definition in the source file.

Differential Revision: https://reviews.llvm.org/D151501

Added: 
    

Modified: 
    lldb/include/lldb/Expression/ExpressionVariable.h
    lldb/source/Expression/ExpressionVariable.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Expression/ExpressionVariable.h 
b/lldb/include/lldb/Expression/ExpressionVariable.h
index ad85a21df5115..277b00a916686 100644
--- a/lldb/include/lldb/Expression/ExpressionVariable.h
+++ b/lldb/include/lldb/Expression/ExpressionVariable.h
@@ -207,6 +207,8 @@ class PersistentExpressionState
   /// LLVM RTTI support
   static char ID;
 
+  PersistentExpressionState();
+
   virtual ~PersistentExpressionState();
 
   virtual lldb::ExpressionVariableSP

diff  --git a/lldb/source/Expression/ExpressionVariable.cpp 
b/lldb/source/Expression/ExpressionVariable.cpp
index 44ab1c2d0b436..f0a28988822fa 100644
--- a/lldb/source/Expression/ExpressionVariable.cpp
+++ b/lldb/source/Expression/ExpressionVariable.cpp
@@ -34,6 +34,8 @@ uint8_t *ExpressionVariable::GetValueBytes() {
 
 char PersistentExpressionState::ID;
 
+PersistentExpressionState::PersistentExpressionState() = default;
+
 PersistentExpressionState::~PersistentExpressionState() = default;
 
 lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) {


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to