summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-10-25 00:08:50 +0000
committerTed Kremenek <kremenek@apple.com>2007-10-25 00:08:50 +0000
commited763de6cb6c562c65a69f484ebe0d694a4c81a6 (patch)
tree442a7e10ee3428fe412fffaaa133b223b4b81515
parente85285b9f33a41278068400dd5e9addf82dfb9f9 (diff)
downloadbcm5719-llvm-ed763de6cb6c562c65a69f484ebe0d694a4c81a6.tar.gz
bcm5719-llvm-ed763de6cb6c562c65a69f484ebe0d694a4c81a6.zip
Added accessors to CompoundStmt to retrieve the source locations for the
left and right bracket. This is useful for serialization. llvm-svn: 43318
-rw-r--r--clang/include/clang/AST/Stmt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h
index e5cc11163f8..a73bd2e56ea 100644
--- a/clang/include/clang/AST/Stmt.h
+++ b/clang/include/clang/AST/Stmt.h
@@ -189,7 +189,7 @@ public:
SourceLocation LB, SourceLocation RB)
: Stmt(CompoundStmtClass), Body(StmtStart, StmtStart+NumStmts),
LBracLoc(LB), RBracLoc(RB) {}
-
+
bool body_empty() const { return Body.empty(); }
typedef llvm::SmallVector<Stmt*, 16>::iterator body_iterator;
@@ -216,6 +216,10 @@ public:
virtual SourceRange getSourceRange() const {
return SourceRange(LBracLoc, RBracLoc);
}
+
+ SourceLocation getLBracLoc() { return LBracLoc; }
+ SourceLocation getRBracLoc() { return RBracLoc; }
+
static bool classof(const Stmt *T) {
return T->getStmtClass() == CompoundStmtClass;
}
OpenPOWER on IntegriCloud