Enable interpreter callbacks again

We actually need those callbacks as they are responsible for
loading decls from unresolved identifiers, which then actually
triggers the loading of the specific header (or in our case
the specific C++ modules).

For now we need this as long as the modules are based on the
rootmap mechanism.
This commit is contained in:
Raphael Isemann 2017-11-01 21:31:14 +01:00 committed by sftnight
parent a03e320a33
commit d411ed7885

View File

@ -179,10 +179,7 @@ namespace cling {
Sema& SemaRef = interp->getSema();
ASTReader* Reader = m_Interpreter->getCI()->getModuleManager().get();
ExternalSemaSource* externalSemaSrc = SemaRef.getExternalSource();
// Disable the ROOT external sema source when we have modules. In the
// modules case the module manager is taking it's place and we don't want
// to overwrite it.
if (!SemaRef.getLangOpts().Modules && enableExternalSemaSourceCallbacks)
if (enableExternalSemaSourceCallbacks)
if (!externalSemaSrc || externalSemaSrc == Reader) {
// If the ExternalSemaSource is the PCH reader we still need to insert
// our listener.