Lines Matching defs:Handler
53 /// FindHandler - Check to see if there is already a handler for the
54 /// specified name. If not, return the handler for the null identifier if it
56 /// the null handler isn't returned on failure to match.
59 if (PragmaHandler *Handler = Handlers.lookup(Name))
60 return Handler;
64 void PragmaNamespace::AddPragma(PragmaHandler *Handler) {
65 assert(!Handlers.lookup(Handler->getName()) &&
66 "A handler with this name is already registered in this namespace");
68 Handlers.GetOrCreateValue(Handler->getName());
69 Entry.setValue(Handler);
72 void PragmaNamespace::RemovePragmaHandler(PragmaHandler *Handler) {
73 assert(Handlers.lookup(Handler->getName()) &&
74 "Handler not registered in this namespace");
75 Handlers.erase(Handler->getName());
85 // Get the handler for this token. If there is no handler, ignore the pragma.
86 PragmaHandler *Handler
90 if (Handler == 0) {
96 Handler->HandlePragma(PP, Introducer, Tok);
112 // If the pragma handler didn't read the rest of the line, consume it now.
664 /// AddPragmaHandler - Add the specified pragma handler to the preprocessor.
668 PragmaHandler *Handler) {
673 // If there is already a pragma handler with the name of this namespace,
679 " handler with the same name!");
682 // handler for it.
689 assert(!InsertNS->FindHandler(Handler->getName()) &&
690 "Pragma handler already exists for this identifier!");
691 InsertNS->AddPragma(Handler);
694 /// RemovePragmaHandler - Remove the specific pragma handler from the
696 /// namespace that \arg Handler was added to. It is an error to remove
697 /// a handler that has not been registered.
699 PragmaHandler *Handler) {
705 assert(Existing && "Namespace containing handler does not exist!");
708 assert(NS && "Invalid namespace, registered as a regular pragma handler!");
711 NS->RemovePragmaHandler(Handler);