aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-19 19:22:57 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-19 19:22:57 +0000
commit1bea8807bcd2be10bf6309a3a848489434464ced (patch)
treef3297b8516e1c0c85cebcae0613143e0242066db /include
parent1a026803b7886ed265fc63dfddaaa5d3712760e3 (diff)
Add support for pretty-printing attributes, from Richard Membarth!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/Attr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index cf2e3c5d25..345cc94510 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -23,6 +23,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstring>
#include <algorithm>
@@ -103,6 +104,9 @@ public:
// Clone this attribute.
virtual Attr* clone(ASTContext &C) const = 0;
+ // Pretty print this attribute.
+ virtual void printPretty(llvm::raw_ostream &OS, ASTContext &C) const = 0;
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Attr *) { return true; }
};