Make the transaction class single list.
git-svn-id: http://root.cern.ch/svn/root/trunk@46676 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
51a176173b
commit
da3a51f5f8
@ -70,15 +70,24 @@ namespace cling {
|
||||
///
|
||||
llvm::Module* m_Module;
|
||||
|
||||
///\brief The wrapper function produced by the intepreter if any,
|
||||
///\brief The wrapper function produced by the intepreter if any.
|
||||
///
|
||||
clang::FunctionDecl* m_WrapperFD;
|
||||
|
||||
///\brief Next transaction in if any.
|
||||
const Transaction* m_Next;
|
||||
|
||||
protected:
|
||||
|
||||
///\brief Sets the next transaction in the list.
|
||||
///
|
||||
void setNext(Transaction* T) { m_Next = T; }
|
||||
|
||||
public:
|
||||
|
||||
Transaction(const CompilationOptions& Opts, llvm::Module* M)
|
||||
: m_Completed(false), m_Parent(0), m_State(kUnknown), m_IssuedDiags(kNone),
|
||||
m_Opts(Opts), m_Module(M), m_WrapperFD(0)
|
||||
m_Opts(Opts), m_Module(M), m_WrapperFD(0), m_Next(0)
|
||||
{ }
|
||||
|
||||
~Transaction();
|
||||
@ -223,6 +232,8 @@ namespace cling {
|
||||
const clang::FunctionDecl* getWrapperFD() const { return m_WrapperFD; }
|
||||
clang::FunctionDecl* getWrapperFD() { return m_WrapperFD; }
|
||||
|
||||
const Transaction* getNext() const { return m_Next; }
|
||||
|
||||
///\brief Prints out all the declarations in the transaction.
|
||||
///
|
||||
void dump() const;
|
||||
@ -236,6 +247,7 @@ namespace cling {
|
||||
void print(llvm::raw_ostream& Out, const clang::PrintingPolicy& Policy,
|
||||
unsigned Indent = 0, bool PrintInstantiation = false) const;
|
||||
|
||||
friend class IncrementalParser;
|
||||
};
|
||||
} // end namespace cling
|
||||
|
||||
|
@ -113,6 +113,7 @@ namespace cling {
|
||||
return;
|
||||
}
|
||||
|
||||
getLastTransaction()->setNext(NewCurT);
|
||||
m_Transactions.push_back(NewCurT);
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,18 @@ namespace cling {
|
||||
return m_Transactions.back();
|
||||
}
|
||||
|
||||
///\brief Returns the first transaction the incremental parser saw.
|
||||
///
|
||||
Transaction* getFirstTransaction() {
|
||||
return m_Transactions.front();
|
||||
}
|
||||
|
||||
///\brief Returns the first transaction the incremental parser saw.
|
||||
///
|
||||
const Transaction* getFirstTransaction() const {
|
||||
return m_Transactions.front();
|
||||
}
|
||||
|
||||
/// \}
|
||||
|
||||
///\brief Compiles the given input with the given compilation options.
|
||||
|
Loading…
x
Reference in New Issue
Block a user