Outline method.
This commit is contained in:
parent
f841f0bc8d
commit
63f1ce5082
@ -268,22 +268,7 @@ namespace cling {
|
|||||||
///
|
///
|
||||||
///\param[in] nested - The transaction to be nested.
|
///\param[in] nested - The transaction to be nested.
|
||||||
///
|
///
|
||||||
void addNestedTransaction(Transaction* nested) {
|
void addNestedTransaction(Transaction* nested);
|
||||||
// Create lazily the list
|
|
||||||
if (!m_NestedTransactions)
|
|
||||||
m_NestedTransactions.reset(new NestedTransactions());
|
|
||||||
|
|
||||||
// Lazy create the container on first append.
|
|
||||||
if (!m_DeclQueue)
|
|
||||||
m_DeclQueue.reset(new DeclQueue());
|
|
||||||
|
|
||||||
nested->setParent(this);
|
|
||||||
// Leave a marker in the parent transaction, where the nested transaction
|
|
||||||
// started.
|
|
||||||
DelayCallInfo marker(clang::DeclGroupRef(), Transaction::kCCINone);
|
|
||||||
m_DeclQueue->push_back(marker);
|
|
||||||
m_NestedTransactions->push_back(nested);
|
|
||||||
}
|
|
||||||
|
|
||||||
///\brief Removes a nested transaction.
|
///\brief Removes a nested transaction.
|
||||||
///
|
///
|
||||||
|
@ -26,6 +26,24 @@ namespace cling {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Transaction::addNestedTransaction(Transaction* nested) {
|
||||||
|
// Create lazily the list
|
||||||
|
if (!m_NestedTransactions)
|
||||||
|
m_NestedTransactions.reset(new NestedTransactions());
|
||||||
|
|
||||||
|
// Lazy create the container on first append.
|
||||||
|
if (!m_DeclQueue)
|
||||||
|
m_DeclQueue.reset(new DeclQueue());
|
||||||
|
|
||||||
|
nested->setParent(this);
|
||||||
|
// Leave a marker in the parent transaction, where the nested transaction
|
||||||
|
// started.
|
||||||
|
DelayCallInfo marker(clang::DeclGroupRef(), Transaction::kCCINone);
|
||||||
|
m_DeclQueue->push_back(marker);
|
||||||
|
m_NestedTransactions->push_back(nested);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Transaction::removeNestedTransaction(Transaction* nested) {
|
void Transaction::removeNestedTransaction(Transaction* nested) {
|
||||||
assert(hasNestedTransactions() && "Does not contain nested transactions");
|
assert(hasNestedTransactions() && "Does not contain nested transactions");
|
||||||
int nestedPos = -1;
|
int nestedPos = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user