Revert "[cxxmodules] Use common-rooted valid source location."
This reverts commit 03febcbd899610de1188886a132fe78c804d3a00. This commit broke the modules bots. Investigating...
This commit is contained in:
parent
b47bbaf546
commit
1a53d8241d
@ -840,10 +840,18 @@ namespace cling {
|
||||
if (getSema().isModuleVisible(M))
|
||||
return true;
|
||||
|
||||
Interpreter::PushTransactionRAII RAII(this);
|
||||
if (declare("#pragma clang module import " + M->Name) == kSuccess)
|
||||
return true;
|
||||
Preprocessor& PP = getCI()->getPreprocessor();
|
||||
|
||||
IdentifierInfo *II = PP.getIdentifierInfo(M->Name);
|
||||
SourceLocation ValidLoc = M->DefinitionLoc;
|
||||
Interpreter::PushTransactionRAII RAII(this);
|
||||
bool success = !getCI()->getSema().ActOnModuleImport(ValidLoc, ValidLoc,
|
||||
std::make_pair(II, ValidLoc)).isInvalid();
|
||||
if (success) {
|
||||
// Also make the module visible in the preprocessor to export its macros.
|
||||
PP.makeModuleVisible(M, ValidLoc);
|
||||
return success;
|
||||
}
|
||||
if (complain) {
|
||||
if (M->IsSystem)
|
||||
llvm::errs() << "Failed to load module " << M->Name << "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user