This commit is contained in:
Vassil Vassilev 2018-10-14 16:09:02 +01:00 committed by sftnight
parent 80fa13b41e
commit cc57c1e08e

View File

@ -617,10 +617,12 @@ namespace cling {
cling::valuePrinterInternal::declarePrintValue(*this);
std::string ret;
std::stringstream ss;
ss << "*((std::string*)" << &ret << ") = cling::printValue((" << type << "*)" << obj << ");";
ss << "*((std::string*)" << &ret << ") = cling::printValue((" << type << "*)"
<< obj << ");";
CompilationResult result = process(ss.str().c_str());
if (result != cling::Interpreter::kSuccess)
llvm::errs() << "Error in Interpreter::toString: the input " << ss.str() << " cannot be evaluated";
llvm::errs() << "Error in Interpreter::toString: the input " << ss.str()
<< " cannot be evaluated";
return ret;
}