diff options
author | Aditya Kumar <hiraditya@msn.com> | 2018-05-31 14:45:32 +0000 |
---|---|---|
committer | Aditya Kumar <hiraditya@msn.com> | 2018-05-31 14:45:32 +0000 |
commit | 6995821e900d3dfa08a8b8f5be3ce4ce70fb3629 (patch) | |
tree | c209b1cd248f9e4aeef79f4f4cbb30da9499760d | |
parent | 2e41c5a79c164250751c76da332e2f7dac9e646e (diff) | |
download | bcm5719-llvm-6995821e900d3dfa08a8b8f5be3ce4ce70fb3629.tar.gz bcm5719-llvm-6995821e900d3dfa08a8b8f5be3ce4ce70fb3629.zip |
Add dump method for selectors
Differential Revision: https://reviews.llvm.org/D45935
Reviewers: compnerd
llvm-svn: 333657
-rw-r--r-- | clang/include/clang/Basic/IdentifierTable.h | 2 | ||||
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index 9a338735181..f43df5c6482 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/include/clang/Basic/IdentifierTable.h @@ -763,6 +763,8 @@ public: /// Prints the full selector name (e.g. "foo:bar:"). void print(llvm::raw_ostream &OS) const; + void dump() const; + /// Derive the conventional family of this method. ObjCMethodFamily getMethodFamily() const { return getMethodFamilyImpl(*this); diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 37703ca776d..2fef481ae2c 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -504,6 +504,8 @@ void Selector::print(llvm::raw_ostream &OS) const { 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. |