forked from OSchip/llvm-project
Added accessors to CompoundStmt to retrieve the source locations for the
left and right bracket. This is useful for serialization. llvm-svn: 43318
This commit is contained in:
parent
e85285b9f3
commit
ed763de6cb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue