diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-15 22:30:43 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-15 22:30:43 +0000 |
commit | 70f5bc77dbe4172bde860e15d8b3c29e0d5005cb (patch) | |
tree | 33902e6996783b5753701d7e1686d01884d50cd5 | |
parent | 80556320e7e22692060f793a7d30aa6630bdd96a (diff) |
Add DeclarationName::dump().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88876 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclarationName.h | 3 | ||||
-rw-r--r-- | lib/AST/DeclarationName.cpp | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h index ed4ac6b5d4..a30f6e860d 100644 --- a/include/clang/AST/DeclarationName.h +++ b/include/clang/AST/DeclarationName.h @@ -176,7 +176,6 @@ public: /// getNameKind - Determine what kind of name this is. NameKind getNameKind() const; - /// getName - Retrieve the human-readable string for this name. std::string getAsString() const; @@ -249,6 +248,8 @@ public: static DeclarationName getTombstoneMarker() { return DeclarationName(uintptr_t(-2)); } + + void dump() const; }; /// Ordering on two declaration names. If both names are identifiers, diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp index 8664c50861..d003594cf3 100644 --- a/lib/AST/DeclarationName.cpp +++ b/lib/AST/DeclarationName.cpp @@ -310,6 +310,10 @@ DeclarationName DeclarationName::getUsingDirectiveName() { return DeclarationName(Ptr); } +void DeclarationName::dump() const { + fprintf(stderr, "%s\n", getAsString().c_str()); +} + DeclarationNameTable::DeclarationNameTable() { CXXSpecialNamesImpl = new llvm::FoldingSet<CXXSpecialName>; |