Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b254999
Import ROOT-llvm16-20231130-01
hahnjo Nov 30, 2023
cd9951b
[interpreter] Require LLVM 16
hahnjo Jul 10, 2023
3ba4c8d
[cling] TargetRegistry.h moved to MC/
hahnjo Jan 18, 2023
8022d26
[cling] llvm::Optional::hasValue was renamed to has_value
hahnjo Jul 10, 2023
501d5cd
[cling] LookupFile takes arguments as ConstSearchDirIterator
hahnjo Jan 18, 2023
6fc65a3
[cling] InclusionDirective takes an clang::OptionalFileEntryRef
hahnjo Jul 10, 2023
90bcb8c
[cling] Update ClingMemoryManager with llvm::Align
hahnjo Jul 10, 2023
5799642
[cling] Misc renamings and type changes
hahnjo Jul 10, 2023
7b35bea
[cling] Adapt arguments for updated APIs
hahnjo Jul 10, 2023
38a6d51
[cling] CompoundStmt::Create takes FPOptionsOverride
hahnjo Jan 20, 2023
6297e34
[cling] getQualifiedTemplateName takes a TemplateName
hahnjo Jan 20, 2023
f0c384b
[cling] SubstDefaultTemplateArgumentIfAvailable
hahnjo Jul 10, 2023
f7565c8
[cling] MultiLevelTemplateArgumentList
hahnjo Jul 10, 2023
14193c1
[cling] Some changes from JITEvaluatedSymbol to ExecutorAddr
hahnjo Jul 10, 2023
0f941db
[cling] Adapt and heavily simplify ClingJITLinkMemoryManager
hahnjo Mar 27, 2023
77923e3
[cling] Lexer does not expose getLangOpts() anymore
hahnjo Jan 18, 2023
adf1080
[cling] Update for new FileNotFound callback
hahnjo Jan 20, 2023
da5a315
[cling] Update InvocationOptions
hahnjo Jul 10, 2023
3aa522d
[cling] Resource directory based on major version only
hahnjo Jul 10, 2023
d3625db
[cling] Remove PMBuilder members
hahnjo Jul 10, 2023
53b7699
[cling] Set MSVolatile in LangOpts
hahnjo Jul 19, 2023
0511292
[cling] Misc adaptations for updated APIs
hahnjo Jul 10, 2023
bbc2454
[cling] Don't print name of EnumDecl if there is none
hahnjo Jul 10, 2023
3a4e4bf
[cling] Adapt to updated forgetDecl signature
hahnjo Jul 11, 2023
7df9357
[cling] Remove extension of legacy pass manager
hahnjo Jul 17, 2023
8316173
[cling] Update handling of ElaboratedType in GetFullyQualifiedType
hahnjo Jul 12, 2023
be0265b
[cling] Update registration of atexit handlers
hahnjo Jul 17, 2023
fa27874
[cling] Handle UsingType in GetPartiallyDesugaredType
hahnjo Jul 20, 2023
ee5dc2f
[cling] Handle ElaboratedType in ReSubstTemplateArg
hahnjo Jul 26, 2023
7ce120e
[cling] Desugar UnaryTransformType
hahnjo Oct 5, 2023
e2511a7
[win64] Disable Cling optimizations
hahnjo Aug 9, 2023
a576e42
[TCling] Prepend drive letter to absolute path
bellenot Sep 4, 2023
73f4b57
[cling] Avoid unloading Decls not found in DeclContext
hahnjo Sep 5, 2023
c4eb332
[cling] Fix preprocessor option parsing
hahnjo Aug 14, 2023
545cf24
[cling] Expect normalized alias option offload_device_only
hahnjo Aug 14, 2023
76d3bb8
[cling] Remove expected space before array brackets in tests
hahnjo Jul 21, 2023
48b686b
Update expected template names in TClingMethodInfoTests.cxx
hahnjo Jul 27, 2023
2f43384
[cling] Remove elaborated keyword from output checks
hahnjo Aug 8, 2023
b6177d4
[cling] Update expected error messages in tests
hahnjo Aug 8, 2023
149f87e
[cling] Update expected types in output checks
hahnjo Aug 8, 2023
ca8b88c
[cling] Expect additional error in Prompt/BlockComments.C
hahnjo Aug 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion core/clingutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ endforeach()
set(CLANG_RESOURCE_DIR_STEM)
if (builtin_clang)
set(CLANG_RESOURCE_DIR_STEM ${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/${CMAKE_CFG_INTDIR}/lib/clang)
set(CLANG_RESOURCE_DIR_VERSION ${LLVM_VERSION})
set(CLANG_RESOURCE_DIR_VERSION ${LLVM_VERSION_MAJOR})
else ()
set(CLANG_RESOURCE_DIR_STEM ${LLVM_LIBRARY_DIR}/clang)
# A user can define a clang version to use, otherwise find it (but will error if more than one version is present)
Expand Down
26 changes: 17 additions & 9 deletions core/clingutils/src/TClingUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2936,6 +2936,7 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
unsigned int dropDefault = normCtxt.GetConfig().DropDefaultArg(*Template);

llvm::SmallVector<clang::TemplateArgument, 4> desArgs;
llvm::SmallVector<clang::TemplateArgument, 4> canonArgs;
llvm::ArrayRef<clang::TemplateArgument> template_arguments = TST->template_arguments();
unsigned int Idecl = 0, Edecl = TSTdecl->getTemplateArgs().size();
unsigned int maxAddArg = TSTdecl->getTemplateArgs().size() - dropDefault;
Expand All @@ -2962,7 +2963,10 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
desArgs.push_back(*I);
continue;
}
clang::TemplateName templateNameWithNSS ( Ctx.getQualifiedTemplateName(nns, false, templateDecl) );
clang::TemplateName UnderlyingTN(templateDecl);
if (clang::UsingShadowDecl *USD = templateName.getAsUsingShadowDecl())
UnderlyingTN = clang::TemplateName(USD);
clang::TemplateName templateNameWithNSS ( Ctx.getQualifiedTemplateName(nns, false, UnderlyingTN) );
desArgs.push_back(clang::TemplateArgument(templateNameWithNSS));
mightHaveChanged = true;
continue;
Expand Down Expand Up @@ -3017,6 +3021,7 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
RAngleLoc,
TTP,
desArgs,
canonArgs,
HasDefaultArgs);
// The substition can fail, in which case there would have been compilation
// error printed on the screen.
Expand Down Expand Up @@ -3329,7 +3334,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,

const FileEntry *headerFE = sourceManager.getFileEntryForID(headerFID);
while (includeLoc.isValid() && sourceManager.isInSystemHeader(includeLoc)) {
const DirectoryLookup *foundDir = nullptr;
ConstSearchDirIterator *foundDir = nullptr;
// use HeaderSearch on the basename, to make sure it takes a header from
// the include path (e.g. not from /usr/include/bits/)
assert(headerFE && "Couldn't find FileEntry from FID!");
Expand Down Expand Up @@ -3378,7 +3383,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
// points to the same file as the long version. If such a short version
// exists it will be returned. If it doesn't the long version is returned.
bool isAbsolute = llvm::sys::path::is_absolute(headerFileName);
llvm::Optional<clang::FileEntryRef> FELong;
clang::OptionalFileEntryRef FELong;
// Find the longest available match.
for (llvm::sys::path::const_iterator
IDir = llvm::sys::path::begin(headerFileName),
Expand All @@ -3394,7 +3399,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
assert(trailingPart.data() + trailingPart.size()
== headerFileName.data() + headerFileName.size()
&& "Mismatched partitioning of file name!");
const DirectoryLookup* FoundDir = nullptr;
ConstSearchDirIterator* FoundDir = nullptr;
FELong = HdrSearch.LookupFile(trailingPart, SourceLocation(),
true /*isAngled*/, nullptr/*FromDir*/, FoundDir,
ArrayRef<std::pair<const FileEntry *, const DirectoryEntry *>>(),
Expand All @@ -3418,7 +3423,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
assert(trailingPart.data() + trailingPart.size()
== headerFileName.data() + headerFileName.size()
&& "Mismatched partitioning of file name!");
const DirectoryLookup* FoundDir = nullptr;
ConstSearchDirIterator* FoundDir = nullptr;
// Can we find it, and is it the same file as the long version?
// (or are we back to the previously found spelling, which is fine, too)
if (HdrSearch.LookupFile(trailingPart, SourceLocation(),
Expand Down Expand Up @@ -3613,12 +3618,14 @@ static bool areEqualTypes(const clang::TemplateArgument& tArg,
{
clang::Sema& S = interp.getCI()->getSema();
cling::Interpreter::PushTransactionRAII clingRAII(const_cast<cling::Interpreter*>(&interp));
llvm::SmallVector<clang::TemplateArgument, 4> canonArgs;
bool HasDefaultArgs;
TemplateArgumentLoc defTArgLoc = S.SubstDefaultTemplateArgumentIfAvailable(Template,
TemplateLoc,
LAngleLoc,
ttpdPtr,
preceedingTArgs,
canonArgs,
HasDefaultArgs);
// The substition can fail, in which case there would have been compilation
// error printed on the screen.
Expand Down Expand Up @@ -4494,7 +4501,7 @@ static bool hasSomeTypedefSomewhere(const clang::Type* T) {
return false; // shrug...
}
bool VisitTypeOfType(const TypeOfType* TOT) {
return TOT->getUnderlyingType().getTypePtr();
return TOT->getUnmodifiedType().getTypePtr();
}
bool VisitElaboratedType(const ElaboratedType* ET) {
NestedNameSpecifier* NNS = ET->getQualifier();
Expand Down Expand Up @@ -4658,7 +4665,7 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons
// Make sure it got replaced from this template
const clang::ClassTemplateDecl *replacedCtxt = nullptr;

const clang::DeclContext *replacedDeclCtxt = substType->getReplacedParameter()->getDecl()->getDeclContext();
const clang::DeclContext *replacedDeclCtxt = substType->getReplacedParameter()->getDeclContext();
const clang::CXXRecordDecl *decl = llvm::dyn_cast<clang::CXXRecordDecl>(replacedDeclCtxt);
unsigned int index = substType->getReplacedParameter()->getIndex();
if (decl) {
Expand Down Expand Up @@ -4718,7 +4725,7 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons

if ((replacedCtxt && replacedCtxt->getCanonicalDecl() == TSTdecl->getSpecializedTemplate()->getCanonicalDecl())
|| /* the following is likely just redundant */
substType->getReplacedParameter()->getDecl()
substType->getReplacedParameter()
== TSTdecl->getSpecializedTemplate ()->getTemplateParameters()->getParam(index))
{
const auto &TAs = TST->template_arguments();
Expand Down Expand Up @@ -4753,7 +4760,8 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons

clang::QualType SubTy = TA.getAsType();
// Check if the type needs more desugaring and recurse.
if (llvm::isa<clang::SubstTemplateTypeParmType>(SubTy)
if (llvm::isa<clang::ElaboratedType>(SubTy)
|| llvm::isa<clang::SubstTemplateTypeParmType>(SubTy)
|| llvm::isa<clang::TemplateSpecializationType>(SubTy)) {
clang::QualType newSubTy = ReSubstTemplateArg(SubTy,instance);
mightHaveChanged = SubTy != newSubTy;
Expand Down
4 changes: 2 additions & 2 deletions core/dictgen/src/TModuleGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TModuleGenerator::GetSourceFileKind(const char *filename) const
// via the FileManager.
clang::Preprocessor &PP = fCI->getPreprocessor();
clang::HeaderSearch &HdrSearch = PP.getHeaderSearchInfo();
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
auto hdrFileEntry
= HdrSearch.LookupFile(filename, clang::SourceLocation(),
true /*isAngled*/, nullptr /*FromDir*/, CurDir,
Expand Down Expand Up @@ -577,7 +577,7 @@ bool TModuleGenerator::FindHeader(const std::string &hdrName, std::string &hdrFu
}
clang::Preprocessor &PP = fCI->getPreprocessor();
clang::HeaderSearch &HdrSearch = PP.getHeaderSearchInfo();
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
if (auto hdrFileEntry
= HdrSearch.LookupFile(hdrName, clang::SourceLocation(),
true /*isAngled*/, nullptr /*FromDir*/, CurDir,
Expand Down
7 changes: 4 additions & 3 deletions core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,7 @@ class TRootClingCallbacks : public cling::InterpreterCallbacks {

void InclusionDirective(clang::SourceLocation /*HashLoc*/, const clang::Token & /*IncludeTok*/,
llvm::StringRef FileName, bool IsAngled, clang::CharSourceRange /*FilenameRange*/,
const clang::FileEntry * /*File*/, llvm::StringRef /*SearchPath*/,
clang::OptionalFileEntryRef /*File*/, llvm::StringRef /*SearchPath*/,
llvm::StringRef /*RelativePath*/, const clang::Module * /*Imported*/,
clang::SrcMgr::CharacteristicKind /*FileType*/) override
{
Expand Down Expand Up @@ -3536,7 +3536,8 @@ class TRootClingCallbacks : public cling::InterpreterCallbacks {
Preprocessor& PP = m_Interpreter->getCI()->getPreprocessor();
HeaderSearch& HS = PP.getHeaderSearchInfo();
// FIXME: Reduce to Core.Rtypes.h.
Module* CoreModule = HS.lookupModule("Core", /*AllowSearch*/false);
Module* CoreModule = HS.lookupModule("Core", SourceLocation(),
/*AllowSearch*/false);
assert(M && "Must have module Core");
PP.makeModuleVisible(CoreModule, ImportLoc);
}
Expand Down Expand Up @@ -3892,7 +3893,7 @@ static bool ModuleContainsHeaders(TModuleGenerator &modGen, clang::HeaderSearch
continue;

clang::ModuleMap::KnownHeader SuggestedModule;
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
if (auto FE = headerSearch.LookupFile(
header, clang::SourceLocation(),
/*isAngled*/ false,
Expand Down
29 changes: 19 additions & 10 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ extern "C" {
#else
#include "Windows4Root.h"
#include <Psapi.h>
#include <direct.h>
#undef GetModuleFileName
#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
#define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name)
Expand Down Expand Up @@ -861,7 +862,7 @@ namespace {
// Yes, throwing exceptions in error handlers is bad.
// Doing nothing is pretty terrible, too.
void exceptionErrorHandler(void * /*user_data*/,
const std::string& reason,
const char *reason,
bool /*gen_crash_diag*/) {
throw std::runtime_error(std::string(">>> Interpreter compilation error:\n") + reason);
}
Expand Down Expand Up @@ -1398,9 +1399,10 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo

clingArgsStorage.push_back("-Wno-undefined-inline");
clingArgsStorage.push_back("-fsigned-char");
// The -O1 optimization flag has nasty side effects on Windows (32 bit)
// The -O1 optimization flag has nasty side effects on Windows (32 and 64 bit)
// See the GitHub issues #9809 and #9944
#if !defined(_MSC_VER) || defined(_WIN64)
// TODO: to be reviewed after the upgrade of LLVM & Clang
#ifndef _MSC_VER
clingArgsStorage.push_back("-O1");
// Disable optimized register allocation which is turned on automatically
// by -O1, but seems to require -O2 to not explode in run time.
Expand All @@ -1411,7 +1413,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo

// Process externally passed arguments if present.
llvm::Optional<std::string> EnvOpt = llvm::sys::Process::GetEnv("EXTRA_CLING_ARGS");
if (EnvOpt.hasValue()) {
if (EnvOpt.has_value()) {
StringRef Env(*EnvOpt);
while (!Env.empty()) {
StringRef Arg;
Expand All @@ -1423,7 +1425,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo
auto GetEnvVarPath = [](const std::string &EnvVar,
std::vector<std::string> &Paths) {
llvm::Optional<std::string> EnvOpt = llvm::sys::Process::GetEnv(EnvVar);
if (EnvOpt.hasValue()) {
if (EnvOpt.has_value()) {
StringRef Env(*EnvOpt);
while (!Env.empty()) {
StringRef Arg;
Expand All @@ -1450,7 +1452,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo

// FIXME: This only will enable frontend timing reports.
EnvOpt = llvm::sys::Process::GetEnv("ROOT_CLING_TIMING");
if (EnvOpt.hasValue())
if (EnvOpt.has_value())
clingArgsStorage.push_back("-ftime-report");

// Add the overlay file. Note that we cannot factor it out for both root
Expand All @@ -1473,7 +1475,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo

std::string ModulesCachePath;
EnvOpt = llvm::sys::Process::GetEnv("CLING_MODULES_CACHE_PATH");
if (EnvOpt.hasValue()){
if (EnvOpt.has_value()){
StringRef Env(*EnvOpt);
assert(llvm::sys::fs::exists(Env) && "Path does not exist!");
ModulesCachePath = Env.str();
Expand Down Expand Up @@ -1535,7 +1537,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[], vo
// Add the Rdict module file extension.
cling::Interpreter::ModuleFileExtensions extensions;
EnvOpt = llvm::sys::Process::GetEnv("ROOTDEBUG_RDICT");
if (!EnvOpt.hasValue())
if (!EnvOpt.has_value())
extensions.push_back(std::make_shared<TClingRdictModuleFileExtension>());

fInterpreter = std::make_unique<cling::Interpreter>(interpArgs.size(),
Expand Down Expand Up @@ -2646,6 +2648,13 @@ void TCling::AddIncludePath(const char *path)
path += 2;
TString sPath(path);
gSystem->ExpandPathName(sPath);
#ifdef _MSC_VER
if (sPath.BeginsWith("/")) {
char drive[3];
snprintf(drive, 3, "%c:", _getdrive() + 'A' - 1);
sPath.Prepend(drive);
}
#endif
fInterpreter->AddIncludePath(sPath.Data());
}

Expand Down Expand Up @@ -3189,7 +3198,7 @@ Bool_t TCling::IsLoaded(const char* filename) const
return kTRUE;

//FIXME: We must use the cling::Interpreter::lookupFileOrLibrary iface.
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
clang::Preprocessor &PP = fInterpreter->getCI()->getPreprocessor();
clang::HeaderSearch &HS = PP.getHeaderSearchInfo();
auto FE = HS.LookupFile(file_name.c_str(),
Expand All @@ -3208,7 +3217,7 @@ Bool_t TCling::IsLoaded(const char* filename) const
/*BuildSystemModule*/ false,
/*OpenFile*/ false,
/*CacheFail*/ false);
if (FE && FE->isValid()) {
if (FE) {
// check in the source manager if the file is actually loaded
clang::SourceManager &SM = fInterpreter->getCI()->getSourceManager();
// this works only with header (and source) files...
Expand Down
32 changes: 11 additions & 21 deletions core/metacling/src/TClingCallbacks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extern "C" {
class AutoloadLibraryMU : public llvm::orc::MaterializationUnit {
public:
AutoloadLibraryMU(const std::string &Library, const llvm::orc::SymbolNameVector &Symbols)
: MaterializationUnit(getSymbolFlagsMap(Symbols), nullptr), fLibrary(Library), fSymbols(Symbols)
: MaterializationUnit({getSymbolFlagsMap(Symbols), nullptr}), fLibrary(Library), fSymbols(Symbols)
{
}

Expand Down Expand Up @@ -203,7 +203,8 @@ class AutoloadLibraryGenerator : public llvm::orc::DefinitionGenerator {
}

if (!missing.empty())
return llvm::make_error<llvm::orc::SymbolsNotFound>(std::move(missing));
return llvm::make_error<llvm::orc::SymbolsNotFound>(
JD.getExecutionSession().getSymbolStringPool(), std::move(missing));

return llvm::Error::success();
}
Expand Down Expand Up @@ -231,7 +232,7 @@ void TClingCallbacks::InclusionDirective(clang::SourceLocation sLoc/*HashLoc*/,
llvm::StringRef FileName,
bool /*IsAngled*/,
clang::CharSourceRange /*FilenameRange*/,
const clang::FileEntry *FE,
clang::OptionalFileEntryRef FE,
llvm::StringRef /*SearchPath*/,
llvm::StringRef /*RelativePath*/,
const clang::Module * Imported,
Expand Down Expand Up @@ -279,9 +280,8 @@ bool TClingCallbacks::LibraryLoadingFailed(const std::string& errmessage, const
// Preprocessor callbacks used to handle special cases like for example:
// #include "myMacro.C+"
//
bool TClingCallbacks::FileNotFound(llvm::StringRef FileName,
llvm::SmallVectorImpl<char> &RecoveryPath) {
// Method called via Callbacks->FileNotFound(Filename, RecoveryPath)
bool TClingCallbacks::FileNotFound(llvm::StringRef FileName) {
// Method called via Callbacks->FileNotFound(Filename)
// in Preprocessor::HandleIncludeDirective(), initially allowing to
// change the include path, and allowing us to compile code via ACLiC
// when specifying #include "myfile.C+", and suppressing the preprocessor
Expand Down Expand Up @@ -330,22 +330,12 @@ bool TClingCallbacks::FileNotFound(llvm::StringRef FileName,
SemaR.TUScope);
int retcode = TCling__CompileMacro(fname.c_str(), options.c_str());
if (retcode) {
// compilation was successful, let's remember the original
// preprocessor "include not found" error suppression flag
if (!fPPChanged)
fPPOldFlag = PP.GetSuppressIncludeNotFoundError();
PP.SetSuppressIncludeNotFoundError(true);
fPPChanged = true;
// compilation was successful, tell the preprocess to silently
// skip the file
return true;
}
return false;
}
}
if (fPPChanged) {
// restore the original preprocessor "include not found" error
// suppression flag
PP.SetSuppressIncludeNotFoundError(fPPOldFlag);
fPPChanged = false;
}
return false;
}

Expand Down Expand Up @@ -425,7 +415,7 @@ bool TClingCallbacks::LookupObject(LookupResult &R, Scope *S) {
bool TClingCallbacks::findInGlobalModuleIndex(DeclarationName Name, bool loadFirstMatchOnly /*=true*/)
{
llvm::Optional<std::string> envUseGMI = llvm::sys::Process::GetEnv("ROOT_USE_GMI");
if (envUseGMI.hasValue())
if (envUseGMI.has_value())
if (!envUseGMI->empty() && !ROOT::FoundationUtils::ConvertEnvValueToBool(*envUseGMI))
return false;

Expand Down Expand Up @@ -619,7 +609,7 @@ bool TClingCallbacks::LookupObject(clang::TagDecl* Tag) {
// filename.
//
bool TClingCallbacks::tryAutoParseInternal(llvm::StringRef Name, LookupResult &R,
Scope *S, const FileEntry* FE /*=0*/) {
Scope *S, clang::OptionalFileEntryRef FE) {
if (!fROOTSpecialNamespace) {
// init error or rootcling
return false;
Expand Down
Loading