Revert "[cxxmodules] Prepone callback initialization in cling."

This reverts commit 62fc3e9eddc6c7e78c3becf60092143607cddf50.
This commit is contained in:
Raphael Isemann 2017-11-01 15:00:24 +01:00 committed by sftnight
parent 8165c1c800
commit a03e320a33

View File

@ -226,17 +226,6 @@ namespace cling {
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
// Disable suggestions for ROOT
bool showSuggestions =
!llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT");
// We need InterpreterCallbacks only if it is a parent Interpreter.
if (!parentInterp) {
std::unique_ptr<InterpreterCallbacks> AutoLoadCB(
new AutoloadCallback(this, showSuggestions));
setCallbacks(std::move(AutoLoadCB));
}
llvm::SmallVector<IncrementalParser::ParseResultTransaction, 2>
IncrParserTransactions;
if (!m_IncrParser->Initialize(IncrParserTransactions, parentInterp)) {
@ -280,6 +269,16 @@ namespace cling {
}
}
// Disable suggestions for ROOT
bool showSuggestions = !llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT");
// We need InterpreterCallbacks only if it is a parent Interpreter.
if (!parentInterp) {
std::unique_ptr<InterpreterCallbacks>
AutoLoadCB(new AutoloadCallback(this, showSuggestions));
setCallbacks(std::move(AutoLoadCB));
}
m_IncrParser->SetTransformers(parentInterp);
if (!m_LLVMContext) {