//===--- SelectorMap.h - Maps selectors to methods and messages -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // SelectorMap creates a mapping from selectors to ObjC method declarations // and ObjC message expressions. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_INDEX_SELECTORMAP_H #define LLVM_CLANG_INDEX_SELECTORMAP_H #include "clang/Index/ASTLocation.h" #include "clang/Index/STLExtras.h" #include "clang/Basic/IdentifierTable.h" #include namespace clang { class ASTContext; class ObjCMethodDecl; namespace idx { /// \brief Maps NamedDecls with the ASTLocations that reference them. /// /// References are mapped and retrieved using the canonical decls. class SelectorMap { public: explicit SelectorMap(ASTContext &Ctx); typedef std::multimap SelMethMapTy; typedef std::multimap SelRefMapTy; typedef pair_value_iterator method_iterator; typedef pair_value_iterator astlocation_iterator; method_iterator methods_begin(Selector Sel) const; method_iterator methods_end(Selector Sel) const; astlocation_iterator refs_begin(Selector Sel) const; astlocation_iterator refs_end(Selector Sel) const; private: mutable SelMethMapTy SelMethMap; mutable SelRefMapTy SelRefMap; }; } // end idx namespace } // end clang namespace #endif