From: Axel Naumann Date: Tue, 20 Jan 2015 16:11:21 +0000 (+0100) Subject: Create an artifical unload point for ACLiC-ed sources (ROOT-7027). X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=5326932d469db76ea63e0474b13e653ad0b71db2 Create an artifical unload point for ACLiC-ed sources (ROOT-7027). --- diff --git a/core/meta/src/TCling.cxx b/core/meta/src/TCling.cxx index d182677..c15458f 100644 --- a/core/meta/src/TCling.cxx +++ b/core/meta/src/TCling.cxx @@ -1395,12 +1395,14 @@ void TCling::RegisterModule(const char* modulename, // Treat Aclic Libs in a special way. Do not delay the parsing. bool hasHeaderParsingOnDemand = fHeaderParsingOnDemand; + bool isACLiC = false; if (hasHeaderParsingOnDemand && strstr(modulename, "_ACLiC_dict") != nullptr){ if (gDebug>1) Info("TCling::RegisterModule", "Header parsing on demand is active but this is an Aclic library. Disabling it for this library."); hasHeaderParsingOnDemand = false; + isACLiC = true; } @@ -1628,18 +1630,23 @@ void TCling::RegisterModule(const char* modulename, clangDiagSuppr diagSuppr(fInterpreter->getSema().getDiagnostics()); - #if defined(R__MUST_REVISIT) - #if R__MUST_REVISIT(6,2) +#if defined(R__MUST_REVISIT) +#if R__MUST_REVISIT(6,2) Warning("TCling::RegisterModule","Diagnostics suppression should be gone by now."); - #endif - #endif +#endif +#endif - if(!hasHeaderParsingOnDemand){ + if (!hasHeaderParsingOnDemand){ + const cling::Transaction* watermark = fInterpreter->getLastTransaction(); cling::Interpreter::CompilationResult compRes = fInterpreter->parseForModule(code.Data()); + if (isACLiC) { + // Register an unload point. + fMetaProcessor->registerUnloadPoint(watermark, headers[0]); + } assert(cling::Interpreter::kSuccess == compRes && "Payload code of a dictionary could not be parsed correctly."); - if (compRes!=cling::Interpreter::kSuccess){ + if (compRes!=cling::Interpreter::kSuccess) { Warning("TCling::RegisterModule", "Problems declaring payload for module %s.", modulename) ; }