Create transactions only if codegen (not rootcling):
The transactions are useful to buffer Decls before sending them to CodeGen, to verify semantic validity before emitting. If there is no codegen, DeclCollecting them wastes CPU cycles during PCH generation time because all headers are in one single transaction. Of course this also speeds up regular rootcling invocations.
This commit is contained in:
parent
8f20c8c6a1
commit
70df14a1c7
@ -194,11 +194,15 @@ namespace cling {
|
||||
if (DGR.isNull())
|
||||
return true;
|
||||
|
||||
if (!m_Consumer)
|
||||
return true;
|
||||
|
||||
assertHasTransaction(m_CurTransaction);
|
||||
|
||||
Transaction::DelayCallInfo DCI(DGR, Transaction::kCCIHandleTopLevelDecl);
|
||||
m_CurTransaction->append(DCI);
|
||||
if (!m_Consumer
|
||||
|| getTransaction()->getIssuedDiags() == Transaction::kErrors)
|
||||
|
||||
if (getTransaction()->getIssuedDiags() == Transaction::kErrors)
|
||||
return true;
|
||||
|
||||
if (comesFromASTReader(DGR)) {
|
||||
|
Loading…
Reference in New Issue
Block a user