GoddamnIDontNeedAUse

Untitled

Sep 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1.   bool TransactionUnloader::unloadDeserializedDeclarations(Transaction* T,
  2.                                                    DeclUnloader& DeclU) {
  3.     //FIXME: Terrible hack, we *must* get rid of parseForModule by implementing
  4.     // a header file generator in cling.
  5.     bool Successful = true;
  6.     for (Transaction::const_reverse_iterator I = T->deserialized_rdecls_begin(),
  7.            E = T->deserialized_rdecls_end(); I != E; ++I) {
  8.       const DeclGroupRef& DGR = (*I).m_DGR;
  9.       for (DeclGroupRef::const_iterator
  10.              Di = DGR.end() - 1, E = DGR.begin() - 1; Di != E; --Di) {
  11.         // We only want to revert all that came through parseForModule, and
  12.         // not the PCH.
  13.         if (!(*Di)->isFromASTFile())
  14.           Successful = DeclU.UnloadDecl(*Di) && Successful;
  15. #ifndef NDEBUG
  16.         assert(Successful && "Cannot handle that yet!");
  17. #endif
  18.       }
  19.     }
  20.     return Successful;
  21.   }
Add Comment
Please, Sign In to add comment