Ask Sema if we enabled modules.

That fixes an issue when running hsimple.C with modules on.
This commit is contained in:
Vassil Vassilev 2017-10-28 16:25:30 +02:00 committed by sftnight
parent 99d1df55ae
commit 8647fad06d

View File

@ -182,7 +182,7 @@ namespace cling {
// 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 (!getenv("ROOT_MODULES") && enableExternalSemaSourceCallbacks)
if (!SemaRef.getLangOpts().Modules && enableExternalSemaSourceCallbacks)
if (!externalSemaSrc || externalSemaSrc == Reader) {
// If the ExternalSemaSource is the PCH reader we still need to insert
// our listener.