Skip to content
Snippets Groups Projects
Commit 74ee4a3d authored by Bertrand Bellenot's avatar Bertrand Bellenot Committed by Axel Naumann
Browse files

Windows: Fix formatting of Interpreter::toString(const char* type, void* obj)

Make sure hexadecimal pointer values have the correct '0x' prefix (not automatic on Windows)
parent 50aefd6c
No related branches found
No related tags found
No related merge requests found
...@@ -681,8 +681,8 @@ namespace cling { ...@@ -681,8 +681,8 @@ namespace cling {
cling::valuePrinterInternal::declarePrintValue(*this); cling::valuePrinterInternal::declarePrintValue(*this);
std::string ret; std::string ret;
std::stringstream ss; std::stringstream ss;
ss << "*((std::string*)" << &ret << ") = cling::printValue((" << type << "*)" ss << "*((std::string*)" << std::hex << std::showbase << (size_t)&ret << ") = cling::printValue((" << type << "*)"
<< obj << ");"; << std::hex << std::showbase << (size_t)obj << ");";
CompilationResult result = process(ss.str().c_str()); CompilationResult result = process(ss.str().c_str());
if (result != cling::Interpreter::kSuccess) if (result != cling::Interpreter::kSuccess)
llvm::errs() << "Error in Interpreter::toString: the input " << ss.str() llvm::errs() << "Error in Interpreter::toString: the input " << ss.str()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment