[cfe-commits] r88876 - in /cfe/trunk: include/clang/AST/DeclarationName.h lib/AST/DeclarationName.cpp
Anders Carlsson
andersca at mac.com
Sun Nov 15 14:30:43 PST 2009
Author: andersca
Date: Sun Nov 15 16:30:43 2009
New Revision: 88876
URL: http://llvm.org/viewvc/llvm-project?rev=88876&view=rev
Log:
Add DeclarationName::dump().
Modified:
cfe/trunk/include/clang/AST/DeclarationName.h
cfe/trunk/lib/AST/DeclarationName.cpp
Modified: cfe/trunk/include/clang/AST/DeclarationName.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclarationName.h?rev=88876&r1=88875&r2=88876&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclarationName.h (original)
+++ cfe/trunk/include/clang/AST/DeclarationName.h Sun Nov 15 16:30:43 2009
@@ -176,7 +176,6 @@
/// 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 @@
static DeclarationName getTombstoneMarker() {
return DeclarationName(uintptr_t(-2));
}
+
+ void dump() const;
};
/// Ordering on two declaration names. If both names are identifiers,
Modified: cfe/trunk/lib/AST/DeclarationName.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclarationName.cpp?rev=88876&r1=88875&r2=88876&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclarationName.cpp (original)
+++ cfe/trunk/lib/AST/DeclarationName.cpp Sun Nov 15 16:30:43 2009
@@ -310,6 +310,10 @@
return DeclarationName(Ptr);
}
+void DeclarationName::dump() const {
+ fprintf(stderr, "%s\n", getAsString().c_str());
+}
+
DeclarationNameTable::DeclarationNameTable() {
CXXSpecialNamesImpl = new llvm::FoldingSet<CXXSpecialName>;
More information about the cfe-commits
mailing list