cling/lib/Interpreter/DynamicExprInfo.cpp

34 lines
1.0 KiB
C++
Raw Normal View History

//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
// author: Vassil Vassilev <vvasilev@cern.ch>
2014-01-07 14:08:37 +04:00
//
// 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.
//------------------------------------------------------------------------------
#include "cling/Interpreter/DynamicExprInfo.h"
#include <sstream>
namespace cling {
namespace runtime {
namespace internal {
const char* DynamicExprInfo::getExpr() {
int i = 0;
size_t found;
while ((found = m_Result.find("@")) && (found != std::string::npos)) {
std::stringstream address;
address << m_Addresses[i];
m_Result = m_Result.insert(found + 1, address.str());
m_Result = m_Result.erase(found, 1);
++i;
}
2014-08-04 06:05:42 +04:00
return m_Result.c_str();
}
} // end namespace internal
} // end namespace runtime
} // end namespace cling