We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1bbc7f commit e9039d8Copy full SHA for e9039d8
src/engine/internal/llvm/llvminstruction.h
@@ -104,6 +104,7 @@ struct LLVMInstruction
104
// Linked list
105
LLVMInstruction *previous = nullptr;
106
LLVMInstruction *next = nullptr;
107
+ std::shared_ptr<LLVMInstruction> _next; // ensure items are not deleted
108
};
109
110
} // namespace libscratchcpp
src/engine/internal/llvm/llvminstructionlist.cpp
@@ -55,8 +55,10 @@ void LLVMInstructionList::addInstruction(std::shared_ptr<LLVMInstruction> ins)
55
56
ins->previous = nullptr;
57
ins->next = nullptr;
58
+ ins->_next = nullptr;
59
} else {
60
m_last->next = ins.get();
61
+ m_last->_next = ins;
62
ins->previous = m_last.get();
63
m_last = ins;
64
}
0 commit comments