aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclarationName.h3
-rw-r--r--lib/AST/DeclarationName.cpp4
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>;