Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool TransactionUnloader::unloadDeserializedDeclarations(Transaction* T,
- DeclUnloader& DeclU) {
- //FIXME: Terrible hack, we *must* get rid of parseForModule by implementing
- // a header file generator in cling.
- bool Successful = true;
- for (Transaction::const_reverse_iterator I = T->deserialized_rdecls_begin(),
- E = T->deserialized_rdecls_end(); I != E; ++I) {
- const DeclGroupRef& DGR = (*I).m_DGR;
- for (DeclGroupRef::const_iterator
- Di = DGR.end() - 1, E = DGR.begin() - 1; Di != E; --Di) {
- // We only want to revert all that came through parseForModule, and
- // not the PCH.
- if (!(*Di)->isFromASTFile())
- Successful = DeclU.UnloadDecl(*Di) && Successful;
- #ifndef NDEBUG
- assert(Successful && "Cannot handle that yet!");
- #endif
- }
- }
- return Successful;
- }
Add Comment
Please, Sign In to add comment