[Lldb-commits] [PATCH] D151501: [LLDB] Explicitly declare constructor in `PersistentExpressionState`

Laszlo Kindrat via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 25 14:19:25 PDT 2023


laszlokindrat created this revision.
laszlokindrat added reviewers: rriddle, bzcheeseman, wallace.
Herald added a project: All.
laszlokindrat requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151501

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


Index: lldb/source/Expression/ExpressionVariable.cpp
===================================================================
--- lldb/source/Expression/ExpressionVariable.cpp
+++ lldb/source/Expression/ExpressionVariable.cpp
@@ -34,6 +34,8 @@
 
 char PersistentExpressionState::ID;
 
+PersistentExpressionState::PersistentExpressionState() = default;
+
 PersistentExpressionState::~PersistentExpressionState() = default;
 
 lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) {
Index: lldb/include/lldb/Expression/ExpressionVariable.h
===================================================================
--- lldb/include/lldb/Expression/ExpressionVariable.h
+++ lldb/include/lldb/Expression/ExpressionVariable.h
@@ -207,6 +207,8 @@
   /// LLVM RTTI support
   static char ID;
 
+  PersistentExpressionState();
+
   virtual ~PersistentExpressionState();
 
   virtual lldb::ExpressionVariableSP


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151501.525801.patch
Type: text/x-patch
Size: 907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230525/37e6e1e4/attachment.bin>


More information about the lldb-commits mailing list