If cling::Value is provided turn result evaluation on.
This commit is contained in:
parent
59c7b7b2d7
commit
9b4ea193c0
@ -590,7 +590,7 @@ namespace cling {
|
||||
CompilationOptions CO;
|
||||
CO.DeclarationExtraction = 0;
|
||||
CO.ValuePrinting = CompilationOptions::VPEnabled;
|
||||
CO.ResultEvaluation = 0;
|
||||
CO.ResultEvaluation = (bool)V;
|
||||
|
||||
return EvaluateInternal(input, CO, V);
|
||||
}
|
||||
|
20
test/Interfaces/echo.C
Normal file
20
test/Interfaces/echo.C
Normal file
@ -0,0 +1,20 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// CLING - the C++ LLVM-based InterpreterG :)
|
||||
//
|
||||
// This file is dual-licensed: you can choose to license it under the University
|
||||
// of Illinois Open Source License or the GNU Lesser General Public License. See
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling 2>&1 | FileCheck %s
|
||||
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
#include "cling/Interpreter/Value.h"
|
||||
|
||||
gCling->echo("1;");
|
||||
// CHECK: 1
|
||||
cling::Value V;
|
||||
gCling->echo("2;", &V);
|
||||
V
|
||||
// CHECK-NEXT: 2
|
||||
// CHECK-NEXT: (cling::Value) boxes [(const int) 2]
|
Loading…
x
Reference in New Issue
Block a user