RawInput mode has proven itself to be very helpful. We should have support for it
on Interpreter level and not at MetaProcessor level. git-svn-id: http://root.cern.ch/svn/root/trunk@47881 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
096a0647c2
commit
b4ae9af6f1
@ -181,6 +181,10 @@ namespace cling {
|
|||||||
///
|
///
|
||||||
bool m_DynamicLookupEnabled;
|
bool m_DynamicLookupEnabled;
|
||||||
|
|
||||||
|
///\brief Flag toggling the raw input on or off.
|
||||||
|
///
|
||||||
|
bool m_RawInputEnabled;
|
||||||
|
|
||||||
///\brief Interpreter callbacks.
|
///\brief Interpreter callbacks.
|
||||||
///
|
///
|
||||||
llvm::OwningPtr<InterpreterCallbacks> m_Callbacks;
|
llvm::OwningPtr<InterpreterCallbacks> m_Callbacks;
|
||||||
@ -531,11 +535,14 @@ namespace cling {
|
|||||||
const llvm::SmallVectorImpl<LoadedFileInfo*>& getLoadedFiles() const {
|
const llvm::SmallVectorImpl<LoadedFileInfo*>& getLoadedFiles() const {
|
||||||
return m_LoadedFiles; }
|
return m_LoadedFiles; }
|
||||||
|
|
||||||
|
bool isPrintingAST() { return m_PrintAST; }
|
||||||
|
void enablePrintAST(bool print = true) { m_PrintAST = print; }
|
||||||
|
|
||||||
void enableDynamicLookup(bool value = true);
|
void enableDynamicLookup(bool value = true);
|
||||||
bool isDynamicLookupEnabled() { return m_DynamicLookupEnabled; }
|
bool isDynamicLookupEnabled() { return m_DynamicLookupEnabled; }
|
||||||
|
|
||||||
bool isPrintingAST() { return m_PrintAST; }
|
bool isRawInputEnabled() { return m_RawInputEnabled; }
|
||||||
void enablePrintAST(bool print = true) { m_PrintAST = print; }
|
void enableRawInput(bool raw = true) { m_RawInputEnabled = raw; }
|
||||||
|
|
||||||
clang::CompilerInstance* getCI() const;
|
clang::CompilerInstance* getCI() const;
|
||||||
const clang::Sema& getSema() const;
|
const clang::Sema& getSema() const;
|
||||||
|
@ -372,6 +372,9 @@ namespace cling {
|
|||||||
Interpreter::CompilationResult
|
Interpreter::CompilationResult
|
||||||
Interpreter::process(const std::string& input, StoredValueRef* V /* = 0 */,
|
Interpreter::process(const std::string& input, StoredValueRef* V /* = 0 */,
|
||||||
const Decl** D /* = 0 */) {
|
const Decl** D /* = 0 */) {
|
||||||
|
if (isRawInputEnabled())
|
||||||
|
return declare(input, D);
|
||||||
|
|
||||||
CompilationOptions CO;
|
CompilationOptions CO;
|
||||||
CO.DeclarationExtraction = 1;
|
CO.DeclarationExtraction = 1;
|
||||||
CO.ValuePrinting = CompilationOptions::VPAuto;
|
CO.ValuePrinting = CompilationOptions::VPAuto;
|
||||||
|
Loading…
Reference in New Issue
Block a user