aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/APValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/APValue.h')
-rw-r--r--include/clang/AST/APValue.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h
index cca00371c2..151956903c 100644
--- a/include/clang/AST/APValue.h
+++ b/include/clang/AST/APValue.h
@@ -21,6 +21,7 @@
#include "llvm/ADT/PointerUnion.h"
namespace clang {
+ class ASTContext;
class CharUnits;
class DiagnosticBuilder;
class Expr;
@@ -28,6 +29,7 @@ namespace clang {
class Decl;
class ValueDecl;
class CXXRecordDecl;
+ class QualType;
/// APValue - This class implements a discriminated union of [uninitialized]
/// [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset],
@@ -171,8 +173,11 @@ public:
bool isUnion() const { return Kind == Union; }
bool isMemberPointer() const { return Kind == MemberPointer; }
- void print(raw_ostream &OS) const;
void dump() const;
+ void dump(raw_ostream &OS) const;
+
+ void printPretty(raw_ostream &OS, ASTContext &Ctx, QualType Ty) const;
+ std::string getAsString(ASTContext &Ctx, QualType Ty) const;
APSInt &getInt() {
assert(isInt() && "Invalid accessor");
@@ -394,15 +399,6 @@ private:
ArrayRef<const CXXRecordDecl*> Path);
};
-inline raw_ostream &operator<<(raw_ostream &OS, const APValue &V) {
- V.print(OS);
- return OS;
-}
-
-// Writes a concise representation of V to DB, in a single << operation.
-const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
- const APValue &V);
-
} // end namespace clang.
#endif