12 #include "cling/Interpreter/InterpreterCallbacks.h"
38 class TClingCallbacks :
public cling::InterpreterCallbacks {
41 clang::NamespaceDecl *fROOTSpecialNamespace;
44 bool fIsAutoloadingRecursively;
45 bool fIsAutoParsingSuspended;
49 TClingCallbacks(cling::Interpreter* interp,
bool hasCodeGen);
55 void SetAutoloadingEnabled(
bool val =
true) { fIsAutoloading = val; }
56 bool IsAutoloadingEnabled() {
return fIsAutoloading; }
58 void SetAutoParsingSuspended(
bool val =
true) { fIsAutoParsingSuspended = val; }
59 bool IsAutoParsingSuspended() {
return fIsAutoParsingSuspended; }
61 virtual bool LibraryLoadingFailed(
const std::string&,
const std::string&,
bool,
bool);
63 virtual void InclusionDirective(clang::SourceLocation ,
65 llvm::StringRef FileName,
67 clang::CharSourceRange ,
68 const clang::FileEntry * ,
71 const clang::Module * );
76 virtual bool FileNotFound(llvm::StringRef FileName,
77 llvm::SmallVectorImpl<char>& RecoveryPath);
79 virtual bool LookupObject(clang::LookupResult &R, clang::Scope *S);
80 virtual bool LookupObject(
const clang::DeclContext* DC,
81 clang::DeclarationName Name);
82 virtual bool LookupObject(clang::TagDecl* Tag);
86 virtual void TransactionCommitted(
const cling::Transaction &T);
90 virtual void TransactionUnloaded(
const cling::Transaction &T);
94 virtual void TransactionRollback(
const cling::Transaction &T);
98 virtual void DefinitionShadowed(
const clang::NamedDecl *D);
102 virtual void DeclDeserialized(
const clang::Decl* D);
104 virtual void LibraryLoaded(
const void* dyLibHandle,
105 llvm::StringRef canonicalName);
106 virtual void LibraryUnloaded(
const void* dyLibHandle,
107 llvm::StringRef canonicalName);
109 virtual void PrintStackTrace();
111 virtual void *EnteringUserCode();
112 virtual void ReturnedFromUserCode(
void *stateInfo);
113 virtual void *LockCompilationDuringUserCodeExecution();
114 virtual void UnlockCompilationDuringUserCodeExecution(
void *StateInfo);
117 bool tryAutoParseInternal(llvm::StringRef Name, clang::LookupResult &R,
118 clang::Scope *S,
const clang::FileEntry* FE = 0);
119 bool tryFindROOTSpecialInternal(clang::LookupResult &R, clang::Scope *S);
120 bool tryResolveAtRuntimeInternal(clang::LookupResult &R, clang::Scope *S);
121 bool shouldResolveAtRuntime(clang::LookupResult &R, clang::Scope *S);
122 bool tryInjectImplicitAutoKeyword(clang::LookupResult &R, clang::Scope *S);