cling/tools/driver/RequiredSymbols.cpp
Vassil Vassilev 3bba03cf9f *The JIT is configured to compile with RTTI so when we #include the SymbolResolverCallback
it looks for typeinfo of the InterpreterCallbacks (compiled with fno-rtti).

*Move the SymbolResolverCallback into InterpreterCallbacks.(h,cpp). Ideally it is 
used only in the testsuite so we could hack in the build system to build the 
SymbolResolverCallback with fno-rtti and include just the header file but that's
for later.
*Set the symbol resolver callback in enableDynamicLookup for now.
*Clear up the logic behind InterpreterExternalSemaSource and InterpreterCallbacks.
*Now the DynamicIDHandler derives from InterpreterExternalSemaSource.
*Adapt the testsuite to the change.
*Request the InterpreterCallback constructor to be put in the binary.


git-svn-id: http://root.cern.ch/svn/root/trunk@46435 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-10 13:00:17 +00:00

35 lines
1.1 KiB
C++

// request symbols
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/CValuePrinter.h"
#include "cling/Interpreter/DynamicExprInfo.h"
#include "cling/Interpreter/InterpreterCallbacks.h"
#include "cling/Interpreter/LookupHelper.h"
#include "cling/Interpreter/ValuePrinter.h"
#include "cling/Interpreter/ValuePrinterInfo.h"
#include "cling/UserInterface/UserInterface.h"
#include "clang/AST/Type.h"
#include "llvm/Support/raw_ostream.h"
namespace cling {
void libcling__symbol_requester(const clang::FunctionDecl& Decl,
const cling::Interpreter& Interp) {
const char* const argv[] = {"libcling__symbol_requester", 0};
cling::Interpreter I(1, argv);
cling::UserInterface U(I);
cling::ValuePrinterInfo VPI(0, 0); // asserts, but we don't call.
printValuePublicDefault(llvm::outs(), 0, VPI);
cling_PrintValue(0, 0, 0);
flushOStream(llvm::outs());
LookupHelper h(0);
h.findType("");
h.findScope("");
h.findFunctionProto(0, "", "");
h.findFunctionArgs(0, "", "");
cling::runtime::internal::DynamicExprInfo DEI(0,0,false);
DEI.getExpr();
cling::InterpreterCallbacks cb(0);
}
}