Skip to content

[cxxmodules] Reduce extra deserializations. #1409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2017
Merged
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
23 changes: 0 additions & 23 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -543,29 +543,6 @@ void TCling::HandleNewDecl(const void* DV, bool isDeserialized, std::set<TClass*
TCling__UpdateClassInfo(NSD);
}

// While classes are read completely (except for function template instances,
// enum, data (and functions) can be added to namespaces at any time.
// [this section can be removed when both the list of data member and the list
// of enums has been update to be active list]
if (const NamespaceDecl* NCtx = dyn_cast<NamespaceDecl>(ND->getDeclContext())) {
if (NCtx->getIdentifier()) {
// No need to load the TClass: if there is something to update then
// it must already exist.
std::string NCtxName;
PrintingPolicy Policy(NCtx->getASTContext().getPrintingPolicy());
llvm::raw_string_ostream stream(NCtxName);
// Don't trigger fopen of the source file to count lines:
Policy.AnonymousTagLocations = false;
NCtx->getNameForDiagnostic(stream, Policy, /*Qualified=*/true);

TClass* cl = (TClass*)gROOT->GetListOfClasses()->FindObject(NCtxName.c_str());
if (cl) {
modifiedTClasses.insert(cl);
}
}
return;
}

// We care about declarations on the global scope.
if (!isa<TranslationUnitDecl>(ND->getDeclContext()))
return;
Expand Down