[PATCH] D45935: Add dump method for selectors

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 22 17:08:01 PDT 2018


hiraditya created this revision.
hiraditya added reviewers: arphaman, compnerd.

https://reviews.llvm.org/D45935

Files:
  include/clang/Basic/IdentifierTable.h
  lib/Basic/IdentifierTable.cpp


Index: lib/Basic/IdentifierTable.cpp
===================================================================
--- lib/Basic/IdentifierTable.cpp
+++ lib/Basic/IdentifierTable.cpp
@@ -476,6 +476,8 @@
   OS << getAsString();
 }
 
+LLVM_DUMP_METHOD void Selector::dump() const { print(llvm::errs()); }
+
 /// Interpreting the given string using the normal CamelCase
 /// conventions, determine whether the given string starts with the
 /// given "word", which is assumed to end in a lowercase letter.
Index: include/clang/Basic/IdentifierTable.h
===================================================================
--- include/clang/Basic/IdentifierTable.h
+++ include/clang/Basic/IdentifierTable.h
@@ -753,6 +753,8 @@
   /// \brief Prints the full selector name (e.g. "foo:bar:").
   void print(llvm::raw_ostream &OS) const;
 
+  void dump() const;
+
   /// \brief Derive the conventional family of this method.
   ObjCMethodFamily getMethodFamily() const {
     return getMethodFamilyImpl(*this);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45935.143493.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/4cb7018d/attachment.bin>


More information about the llvm-commits mailing list