diff options
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r-- | include/clang/Basic/IdentifierTable.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h index 304ff364bfc9..0c278a17a32d 100644 --- a/include/clang/Basic/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -17,12 +17,9 @@ #define LLVM_CLANG_BASIC_IDENTIFIERTABLE_H #include "clang/Basic/LLVM.h" -#include "clang/Basic/OperatorKinds.h" #include "clang/Basic/TokenKinds.h" -#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/PointerLikeTypeTraits.h" #include <cassert> #include <string> @@ -428,7 +425,7 @@ public: /// \brief Create the identifier table, populating it with info about the /// language keywords for the language specified by \p LangOpts. IdentifierTable(const LangOptions &LangOpts, - IdentifierInfoLookup* externalLookup = 0); + IdentifierInfoLookup* externalLookup = nullptr); /// \brief Set the external identifier lookup mechanism. void setExternalIdentifierLookup(IdentifierInfoLookup *IILookup) { @@ -625,7 +622,7 @@ class Selector { IdentifierInfo *getAsIdentifierInfo() const { if (getIdentifierInfoFlag() < MultiArg) return reinterpret_cast<IdentifierInfo *>(InfoPtr & ~ArgFlags); - return 0; + return nullptr; } MultiKeywordSelector *getMultiKeywordSelector() const { return reinterpret_cast<MultiKeywordSelector *>(InfoPtr & ~ArgFlags); @@ -697,9 +694,11 @@ public: /// \brief Derive the full selector name (e.g. "foo:bar:") and return /// it as an std::string. - // FIXME: Add a print method that uses a raw_ostream. std::string getAsString() const; + /// \brief Prints the full selector name (e.g. "foo:bar:"). + void print(llvm::raw_ostream &OS) const; + /// \brief Derive the conventional family of this method. ObjCMethodFamily getMethodFamily() const { return getMethodFamilyImpl(*this); @@ -812,6 +811,8 @@ struct DenseMapInfo<clang::Selector> { template <> struct isPodLike<clang::Selector> { static const bool value = true; }; +template <typename T> class PointerLikeTypeTraits; + template<> class PointerLikeTypeTraits<clang::Selector> { public: |