Cling - The Interactive C++ Interpreter
Go to file
Vassil Vassilev 052976bf88 endTransaction should take a transaction to be ended.
Parsing code in ROOT can lead to lookups which open a nested transactions. Ending
the current transaction in these cases is misleading because usually the
transaction that is expected to be ended is different.

Add an argument to endTransaction to disambiguate. Please note that this fixes
the regular cases of ROOT autoloading.

One of the remaining issues is autoloading of classes, which are passed in as
template arguments. The second remaining is autoloading of classes residing in
unnamed namespaces. Eg. MyNamespace::MyClass, where the diagnostic is issued upon
seeing that MyNamespace is unknown.
2013-04-27 01:52:55 +02:00
demo Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.) 2012-09-05 09:37:39 +00:00
docs Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.) 2012-09-05 09:37:39 +00:00
include Factor our common functionality and replace CreateTypeSourceInfo with getTrivialTypeSourceInfo. 2013-04-25 12:48:15 +00:00
lib endTransaction should take a transaction to be ended. 2013-04-27 01:52:55 +02:00
patches Instead of changing -I to pick up the new location of RAIIObjectsForParser.h use a forwarding #include in the old file. 2013-04-26 18:02:44 +02:00
test Add library path. 2013-04-25 16:22:23 +00:00
tools Update dependencies - changes in llvm trunk. 2013-04-25 16:41:54 +00:00
www Axel's google tech talk. 2013-03-20 09:59:25 +00:00
CMakeLists.txt From Pere: 2012-12-13 17:22:52 +00:00
LastKnownGoodLLVMSVNRevision.txt Update to clang/llvm r179269 (llvm vendor branch r49215): 2013-04-24 16:28:08 +00:00
Makefile Do not update LastKnownGoodLLVMSVNRevision.txt automatically; this will be done as part of the ROOT vendor branch import / update. 2012-09-18 15:28:45 +00:00
Module.mk We also need llvm/Config/llvm-config.h for runtime 2013-04-24 19:12:50 +00:00
README Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.) 2012-09-05 09:37:39 +00:00

          _  _  _      _         _  _  _   _           _      _  _  _
       _ (_)(_)(_) _  (_)       (_)(_)(_) (_) _       (_)  _ (_)(_)(_) _
      (_)         (_) (_)          (_)    (_)(_)_     (_) (_)         (_)
      (_)             (_)          (_)    (_)  (_)_   (_) (_)    _  _  _
      (_)             (_)          (_)    (_)    (_)_ (_) (_)   (_)(_)(_)
      (_)          _  (_)          (_)    (_)      (_)(_) (_)         (_)
      (_) _  _  _ (_) (_) _  _   _ (_) _  (_)         (_) (_) _  _  _ (_)
         (_)(_)(_)    (_)(_)(_) (_)(_)(_) (_)         (_)    (_)(_)(_)(_)

--------------------------------------------------------------------------------

1. I N S T A L L A T I O N   I N S T R U C T I O N S

1.1 Dependencies

   CLING source depends on the LLVM [1] and CLANG [2] headers and libraries.
You will also need CMake [3] >= 2.6.1 or GNU Make to build all of those
packages and subversion [4] to get the source code.

   [1] http://llvm.org
   [2] http://clang.llvm.org
   [3] http://cmake.org
   [4] http://subversion.tigris.org/

1.2 Building

   To build LLVM and CLANG you must:

   * Check out the sources:

     mkdir src
     cd src
     svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
     cd llvm/tools
     svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
     svn co http://root.cern.ch/svn/root/trunk/interpreter/cling cling
     cd ..

   * Apply some patches

     cat tools/cling/patches/* | patch -p0

   * Configure, build and install them, either using CMake:

     cd ..
     mkdir build
     cd build
     cmake -DCMAKE_INSTALL_PREFIX=/some/install/dir \
           -DLLVM_TARGETS_TO_BUILD=CBackend\;CppBackend\;X86 \
           -DCMAKE_BUILD_TYPE=Debug \
           -DCMAKE_CXX_COMPILER=`which c++` \
           -DCMAKE_C_COMPILER=`which gcc` \
           ../llvm
     make
     make install

     or GNU Make (see ../src/configure --help for all options):

     cd ..
     mkdir build
     cd build
     ../llvm/configure --prefix=/some/install/dir
     make
     make install

2. U S A G E

   To interpret a C file type: "./cling test.c". To invoke cling in the
interactive mode type "cling" without file name.  Use ".L filename" to 
load libraries or C++ files.  Type C++ code at the prompt to interpret it.