Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/base/inc/RtypesImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ inline void operator delete(void*, ROOT::Internal::TOperatorNewHelper*) { }

// The STL GenerateInitInstance are not unique and hence are declared static
// (not accessible outside the dictionary and not linker error for duplicate)
#if defined(__CINT__)
#if defined(__CINT__) || defined(__CLING__)
#define RootStlStreamer(name,STREAMER)
#else
#define RootStlStreamer(name,STREAMER) \
Expand Down
6 changes: 3 additions & 3 deletions core/base/src/TApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ Longptr_t TApplication::ProcessLine(const char *line, Bool_t sync, Int_t *err)
return 0;

#if 0
// delete the ROOT dictionary since CINT will destroy all objects
// delete the ROOT dictionary since CLING will destroy all objects
// referenced by the dictionary classes (TClass et. al.)
gROOT->GetListOfClasses()->Delete();
// fall through
Expand Down Expand Up @@ -1814,8 +1814,8 @@ Longptr_t TApplication::ExecuteFile(const char *file, Int_t *error, Bool_t keep)
// "#else" or "#endif" will be skipped.
if (*s == '#') {
char *cs = Compress(currentline);
if (strstr(cs, "#ifndef__CINT__") ||
strstr(cs, "#if!defined(__CINT__)"))
if (strstr(cs, "#ifndef__CINT__") || strstr(cs, "#ifndef__CLING__") ||
strstr(cs, "#if!defined(__CINT__)") || strstr(cs, "#if!defined(__CLING__)"))
ifndefc = 1;
else if (ifndefc && (strstr(cs, "#ifdef") || strstr(cs, "#ifndef") ||
strstr(cs, "#ifdefined") || strstr(cs, "#if!defined")))
Expand Down
4 changes: 2 additions & 2 deletions core/base/src/TSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ const char *TSystem::GetLibraries(const char *regexp, const char *options,
if (opt.IsNull() || opt.First('D') != kNPOS)
libs += gInterpreter->GetSharedLibs();

// Cint currently register all libraries that
// CLING currently register all libraries that
// are loaded and have a dictionary in them, this
// includes all the libraries that are included
// in the list of (hard) linked libraries.
Expand Down Expand Up @@ -3457,7 +3457,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
linkdefFile << "// File Automatically generated by the ROOT Script Compiler "
<< std::endl;
linkdefFile << std::endl;
linkdefFile << "#ifdef __CINT__" << std::endl;
linkdefFile << "#ifdef __CLING__" << std::endl;
linkdefFile << std::endl;
linkdefFile << "#pragma link C++ nestedclasses;" << std::endl;
linkdefFile << "#pragma link C++ nestedtypedefs;" << std::endl;
Expand Down
10 changes: 6 additions & 4 deletions core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ void CallWriteStreamer(const ROOT::TMetaUtils::AnnotatedRecordDecl &cl,
void GenerateLinkdef(llvm::cl::list<std::string> &InputFiles,
std::string &code_for_parser)
{
code_for_parser += "#ifdef __CINT__\n\n";
code_for_parser += "#if defined(__CINT__) or defined(__CLING__)\n\n";
code_for_parser += "#pragma link off all globals;\n";
code_for_parser += "#pragma link off all classes;\n";
code_for_parser += "#pragma link off all functions;\n\n";
Expand Down Expand Up @@ -4274,8 +4274,8 @@ int RootClingMain(int argc,
// Data is in 'outputFile', therefore in the same scope.
llvm::StringRef moduleName;
std::string vfsArg;
// Adding -fmodules to the args will break lexing with __CINT__ defined,
// and we actually do lex with __CINT__ and reuse this variable later,
// Adding -fmodules to the args will break lexing with __CLING__(__CINT__) defined,
// and we actually do lex with __CLING__(__CINT__) and reuse this variable later,
// we have to copy it now.
auto clingArgsInterpreter = clingArgs;

Expand Down Expand Up @@ -4485,9 +4485,11 @@ int RootClingMain(int argc,
ROOT::TMetaUtils::TClingLookupHelper helper(interp, normCtxt, nullptr, nullptr, nullptr, nullptr);
TClassEdit::Init(&helper);

// flags used only for the pragma parser:
// flags used only for the pragma parser, for compatibility:
clingArgs.push_back("-D__CINT__");
clingArgs.push_back("-D__MAKECINT__");
clingArgs.push_back("-D__CLING__");
clingArgs.push_back("-D__MAKECLING__");

AddPlatformDefines(clingArgs);

Expand Down
4 changes: 2 additions & 2 deletions roottest/cling/const/constissue.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
int get_histogram(char const* , char const* ){return 0; }
template<class T> void get_histogram(T const & t, char const * name);
#ifdef __CINT__
#ifdef __CLING__
// Can't remember what this is actually testing but it should not do
// any harm anyway!
#pragma link C++ function get_histogram;
Expand All @@ -16,7 +16,7 @@ class TriggerCharacterizer {
trigger_counting_map m_map;
};

#ifdef __CINT__
#ifdef __CLING__
//#pragma link C++ class TriggerCharacterizer::trigger_counting_map;
#endif

Expand Down
12 changes: 6 additions & 6 deletions roottest/cling/dict/algebra3
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace aux {

#ifndef __CINT__
#ifndef __CLING__
using std::size_t;
using std::complex;
using std::istream;
Expand All @@ -32,7 +32,7 @@ namespace aux {
using std::sin;
// using std::conj;
using std::norm;
#endif /* __CINT__ */
#endif /* __CLING__ */

/* ****************** algebra3.h begins here ****************** */

Expand Down Expand Up @@ -710,7 +710,7 @@ namespace aux {
// Implementation
//

#ifndef __CINT__
#ifndef __CLING__

/****************************************************************
* *
Expand Down Expand Up @@ -1999,7 +1999,7 @@ namespace aux {
((_Tp)0), ((_Tp)0), ((_Tp)1), ((_Tp)0),
((_Tp)0), ((_Tp)0), ((_Tp)1) / d, ((_Tp)0)); }

#endif /* __CINT__ */
#endif /* __CLING__ */

/* ******************* algebra3.h ends here ******************* */

Expand Down Expand Up @@ -2041,7 +2041,7 @@ namespace aux {
template<typename _Tp> mat3<_Tp> ExtractRotation(const mat4<_Tp>& pose); // extract rotation matrix from transformation matrix
template<typename _Tp> typename rtti<_Tp>::value_type PointToPlane(const vec3<_Tp>& point, const vec4<_Tp>& plane); // unsigned distance from a point to a plane (3D)

#ifndef __CINT__
#ifndef __CLING__

//
// rotation2D -- convert 2x2 rotation matrix to 3x3
Expand Down Expand Up @@ -2176,7 +2176,7 @@ namespace aux {
return dist;
}

#endif /* __CINT__ */
#endif /* __CLING__ */

#ifdef fmin
#undef fmin // allow as function names
Expand Down
6 changes: 3 additions & 3 deletions roottest/cling/dict/operators_dict.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "operators.h"

#ifdef __MAKECINT__
#ifdef __MAKECLING__
#pragma link C++ class myiterator;
#pragma link C++ operators myiterator;
#endif
Expand All @@ -12,14 +12,14 @@ namespace enclosing {
#include "operators.h"
}

#ifdef __MAKECINT__
#ifdef __MAKECLING__
#pragma link C++ class enclosing::myiterator;
#pragma link C++ operators enclosing::myiterator;
#endif
#endif

#include <vector>
#ifdef __MAKECINT__
#ifdef __MAKECLING__
#pragma link C++ class vector<myiterator>;
#pragma link C++ class vector<myiterator>::const_iterator;
#pragma link C++ class vector<myiterator>::iterator;
Expand Down
Loading
Loading