Revert "[cxxmodules] Prepone callback initialization in cling."
This reverts commit 62fc3e9eddc6c7e78c3becf60092143607cddf50.
This commit is contained in:
parent
8165c1c800
commit
a03e320a33
@ -226,17 +226,6 @@ namespace cling {
|
|||||||
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
|
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
|
||||||
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
|
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>
|
llvm::SmallVector<IncrementalParser::ParseResultTransaction, 2>
|
||||||
IncrParserTransactions;
|
IncrParserTransactions;
|
||||||
if (!m_IncrParser->Initialize(IncrParserTransactions, parentInterp)) {
|
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);
|
m_IncrParser->SetTransformers(parentInterp);
|
||||||
|
|
||||||
if (!m_LLVMContext) {
|
if (!m_LLVMContext) {
|
||||||
|
Loading…
Reference in New Issue
Block a user