Add comment explaining (part of) the bootstrap sequencing.
This commit is contained in:
parent
b44c7c69c0
commit
7390550dfe
@ -98,7 +98,6 @@ namespace cling {
|
||||
const std::string& PCHFileName
|
||||
= m_CI->getInvocation ().getPreprocessorOpts().ImplicitPCHInclude;
|
||||
if (!PCHFileName.empty()) {
|
||||
|
||||
Transaction* CurT = beginTransaction(CO);
|
||||
m_CI->createPCHExternalASTSource(PCHFileName,
|
||||
true /*DisablePCHValidation*/,
|
||||
@ -124,8 +123,12 @@ namespace cling {
|
||||
if (External)
|
||||
External->StartTranslationUnit(m_Consumer);
|
||||
|
||||
// DO NOT commit the transactions here: static initialization in these
|
||||
// transactions requires gCling through local_cxa_atexit(), but that has not
|
||||
// been defined yet!
|
||||
if (Transaction* EndedT = endTransaction(CurT))
|
||||
result.push_back(EndedT);
|
||||
|
||||
}
|
||||
|
||||
IncrementalParser::~IncrementalParser() {
|
||||
|
@ -198,7 +198,9 @@ namespace cling {
|
||||
else
|
||||
IncludeCRuntime();
|
||||
|
||||
for (llvm::SmallVectorImpl<Transaction*>::const_iterator
|
||||
// Commit the transactions, now that gCling is set up. It is needed for
|
||||
// static initialization in these transactions through local_cxa_atexit().
|
||||
for (llvm::SmallVectorImpl<Transaction*>::const_iterator
|
||||
I = IncrParserTransactions.begin(), E = IncrParserTransactions.end();
|
||||
I != E; ++I)
|
||||
m_IncrParser->commitTransaction(*I);
|
||||
|
Loading…
Reference in New Issue
Block a user