aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-10-25 15:39:09 +0000
committerTed Kremenek <kremenek@apple.com>2007-10-25 15:39:09 +0000
commitcc326204dd97771c336b9aab3b9963ea30d69c29 (patch)
tree5c5aa235b8e2b008b0cb4264bf5c9e0e10d95956
parent27437caadea35f84d550cd29f024fcf3ea240eec (diff)
Added constness to accessors in CompoundStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Stmt.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index a73bd2e56e..91a5429621 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -18,6 +18,7 @@
#include "clang/AST/StmtIterator.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator"
+#include "llvm/Bitcode/Serialization.h"
#include <iosfwd>
namespace clang {
@@ -217,8 +218,8 @@ public:
return SourceRange(LBracLoc, RBracLoc);
}
- SourceLocation getLBracLoc() { return LBracLoc; }
- SourceLocation getRBracLoc() { return RBracLoc; }
+ SourceLocation getLBracLoc() const { return LBracLoc; }
+ SourceLocation getRBracLoc() const { return RBracLoc; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CompoundStmtClass;
@@ -661,4 +662,17 @@ public:
} // end namespace clang
+//===----------------------------------------------------------------------===//
+// For Stmt serialization.
+//===----------------------------------------------------------------------===//
+
+namespace llvm {
+
+template<> struct SerializeTrait<clang::Stmt> {
+ static void Emit(Serializer& S, clang::Stmt& stmt);
+ static clang::Stmt* Materialize(Deserializer& D);
+};
+
+} // end namespace llvm
+
#endif