Compilation fixes to compile CLING alone

Hi,

To compile CLING alone using the “clone.sh” script, I had to make the following changes:

diff --git a/lib/Interpreter/AutoloadCallback.cpp b/lib/Interpreter/AutoloadCallback.cpp
index 05835a4..8ee08ff 100644
--- a/lib/Interpreter/AutoloadCallback.cpp
+++ b/lib/Interpreter/AutoloadCallback.cpp
@@ -13,7 +13,7 @@ namespace cling {
     Sema& sema= m_Interpreter->getSema();
 
     unsigned id
-      = sema.getDiagnostics().getCustomDiagID (DiagnosticsEngine::Level::Warning,
+      = sema.getDiagnostics().getCustomDiagID (DiagnosticsEngine::Warning,
                                                  "Note: '%0' can be found in %1");
 /*    unsigned idn //TODO: To be enabled after we have a way to get the full path
       = sema.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Level::Note,
diff --git a/lib/Interpreter/IncrementalExecutor.h b/lib/Interpreter/IncrementalExecutor.h
index 6403e39..99eaded 100644
--- a/lib/Interpreter/IncrementalExecutor.h
+++ b/lib/Interpreter/IncrementalExecutor.h
@@ -56,7 +56,7 @@ namespace cling {
     /// if it is NULL, but the symbol second.second which must exist at the time
     /// the symbol is replaced. The replacement is tried again until first us
     /// found.
-    std::map<std::string,std::pair<void*,std::string>> m_SymbolsToRemap;
+    std::map<std::string,std::pair<void*,std::string> > m_SymbolsToRemap;
 
     ///\breif Helper that manages when the destructor of an object to be called.
     ///
diff --git a/lib/Interpreter/Interpreter.cpp b/lib/Interpreter/Interpreter.cpp
index 3a7113a..b7fe9d7 100644
--- a/lib/Interpreter/Interpreter.cpp
+++ b/lib/Interpreter/Interpreter.cpp
@@ -1213,7 +1213,7 @@ namespace cling {
 //    }
     std::string err;
     llvm::raw_fd_ostream out(outFile.data(), err,
-                             llvm::sys::fs::OpenFlags::F_None);
+                             llvm::sys::fs::F_None);
 
     ForwardDeclPrinter visitor(out,getSema().getSourceManager());
 
diff --git a/lib/Interpreter/ValueExtractionSynthesizer.cpp b/lib/Interpreter/ValueExtractionSynthesizer.cpp
index d883213..dcf1fa7 100644
--- a/lib/Interpreter/ValueExtractionSynthesizer.cpp
+++ b/lib/Interpreter/ValueExtractionSynthesizer.cpp
@@ -182,7 +182,7 @@ namespace {
       if(RD->hasTrivialCopyConstructor()) return true;
       // Lookup the copy canstructor and check its accessiblity.
       if (CXXConstructorDecl* CD = S->LookupCopyingConstructor(RD, QT.getCVRQualifiers())) {
-        if (!CD->isDeleted() && CD ->getAccess() == clang::AccessSpecifier::AS_public) {
+        if (!CD->isDeleted() && CD ->getAccess() == clang::AS_public) {
           return true;
         }
       }

I guess that three of them are due to recent changes in clang source code.

I’m also wondering what’s your current experience with CLING and heavily templated code? I was super excited to use Eigen (eigen.tuxfamily.org) through CLING, but unfortunately I got more segfaults than successes.

Hi,
Sorry for the late answer. I think you didn’t configure llvm with --enable-cxx11. Could you check?
The heavy templated code should work. One limitation is the unsupported by the JIT inline asm.
Cheers,
Vassil

That did the job regarding the compilations issues. Sorry for the noise.