Start and commit the transaction containing StartTU.
To do: end and begin-of-next transaction should be tied together, else we might have decls not ending up in any transaction. git-svn-id: http://root.cern.ch/svn/root/branches/dev/root6-pch@48936 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
0de0164c3f
commit
cd50723fb1
@ -85,11 +85,12 @@ namespace cling {
|
||||
getCodeGenerator()->Initialize(getCI()->getASTContext());
|
||||
const std::string& PCHFileName
|
||||
= m_CI->getInvocation ().getPreprocessorOpts().ImplicitPCHInclude;
|
||||
|
||||
CompilationOptions CO;
|
||||
CO.DeclarationExtraction = 0;
|
||||
CO.ValuePrinting = CompilationOptions::VPDisabled;
|
||||
CO.CodeGeneration = hasCodeGenerator();
|
||||
if (!PCHFileName.empty()) {
|
||||
CompilationOptions CO;
|
||||
CO.DeclarationExtraction = 0;
|
||||
CO.ValuePrinting = CompilationOptions::VPDisabled;
|
||||
CO.CodeGeneration = hasCodeGenerator();
|
||||
beginTransaction(CO);
|
||||
m_CI->createPCHExternalASTSource(PCHFileName,
|
||||
true /*DisablePCHValidation*/,
|
||||
@ -99,6 +100,7 @@ namespace cling {
|
||||
commitTransaction(endTransaction());
|
||||
}
|
||||
|
||||
beginTransaction(CO);
|
||||
Sema* TheSema = &m_CI->getSema();
|
||||
m_Parser.reset(new Parser(m_CI->getPreprocessor(), *TheSema,
|
||||
false /*skipFuncBodies*/));
|
||||
@ -112,6 +114,7 @@ namespace cling {
|
||||
ExternalASTSource *External = TheSema->getASTContext().getExternalSource();
|
||||
if (External)
|
||||
External->StartTranslationUnit(m_Consumer);
|
||||
commitTransaction(endTransaction());
|
||||
}
|
||||
|
||||
IncrementalParser::~IncrementalParser() {
|
||||
|
Loading…
Reference in New Issue
Block a user