diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-27 00:48:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-27 00:48:22 +0000 |
commit | 872eb55f5e4bd11a8263c5d27c14b45ed0d2f86c (patch) | |
tree | eede5288af79de7f07820d17062a51c214129488 /clang/lib/AST | |
parent | e80159da05f33afda83857c61515957baa4c15a4 (diff) | |
download | bcm5719-llvm-872eb55f5e4bd11a8263c5d27c14b45ed0d2f86c.tar.gz bcm5719-llvm-872eb55f5e4bd11a8263c5d27c14b45ed0d2f86c.zip |
make "call foo.dump()" and "call foo->dump()" work in GDB,
with QualTypes and Types.
llvm-svn: 54116
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/Type.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index d5bef07ca96..d32f963acb1 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -810,6 +810,17 @@ void QualType::dump(const char *msg) const { else fprintf(stderr, "%s\n", R.c_str()); } +void QualType::dump() const { + dump(""); +} + +void Type::dump() const { + std::string S = "identifier"; + getAsStringInternal(S); + fprintf(stderr, "%s\n", S.c_str()); +} + + static void AppendTypeQualList(std::string &S, unsigned TypeQuals) { // Note: funkiness to ensure we get a space only between quals. |