Do not mark decls used, just to prevent unloading!

This has the side effect that many symbols will need to be emitted.
It's much cheaper to not DeclUnload these decls instead.
This commit is contained in:
Axel Naumann 2017-03-31 10:08:07 +02:00 committed by sftnight
parent 7dc6a1be42
commit c85f9a2c57

View File

@ -59,7 +59,11 @@ namespace cling {
///\param[in] D - The declaration to forward.
///\returns true on success.
///
bool UnloadDecl(clang::Decl* D) { return Visit(D); }
bool UnloadDecl(clang::Decl* D) {
if (D->isFromASTFile())
return true;
return Visit(D);
}
///\brief If it falls back in the base class just remove the declaration
/// only from the declaration context.