Stmt** Body;
SourceLocation LBracLoc, RBracLoc;
public:
- CompoundStmt(const ASTContext &C, ArrayRef<Stmt*> Stmts,
+ CompoundStmt(ASTContext &C, ArrayRef<Stmt*> Stmts,
SourceLocation LB, SourceLocation RB);
// \brief Build an empty compound statment with a location.
CompoundStmtBits.NumStmts = 0;
}
- void setStmts(const ASTContext &C, Stmt **Stmts, unsigned NumStmts);
+ void setStmts(ASTContext &C, Stmt **Stmts, unsigned NumStmts);
bool body_empty() const { return CompoundStmtBits.NumStmts == 0; }
unsigned size() const { return CompoundStmtBits.NumStmts; }
}
public:
- static AttributedStmt *Create(const ASTContext &C, SourceLocation Loc,
+ static AttributedStmt *Create(ASTContext &C, SourceLocation Loc,
ArrayRef<const Attr*> Attrs, Stmt *SubStmt);
// \brief Build an empty attributed statement.
- static AttributedStmt *CreateEmpty(const ASTContext &C, unsigned NumAttrs);
+ static AttributedStmt *CreateEmpty(ASTContext &C, unsigned NumAttrs);
SourceLocation getAttrLoc() const { return AttrLoc; }
ArrayRef<const Attr*> getAttrs() const {
SourceLocation ElseLoc;
public:
- IfStmt(const ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond,
+ IfStmt(ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond,
Stmt *then, SourceLocation EL = SourceLocation(), Stmt *elsev = 0);
/// \brief Build an empty if/then/else statement
/// }
/// \endcode
VarDecl *getConditionVariable() const;
- void setConditionVariable(const ASTContext &C, VarDecl *V);
+ void setConditionVariable(ASTContext &C, VarDecl *V);
/// If this IfStmt has a condition variable, return the faux DeclStmt
/// associated with the creation of that condition variable.
unsigned AllEnumCasesCovered : 1;
public:
- SwitchStmt(const ASTContext &C, VarDecl *Var, Expr *cond);
+ SwitchStmt(ASTContext &C, VarDecl *Var, Expr *cond);
/// \brief Build a empty switch statement.
explicit SwitchStmt(EmptyShell Empty) : Stmt(SwitchStmtClass, Empty) { }
/// }
/// \endcode
VarDecl *getConditionVariable() const;
- void setConditionVariable(const ASTContext &C, VarDecl *V);
+ void setConditionVariable(ASTContext &C, VarDecl *V);
/// If this SwitchStmt has a condition variable, return the faux DeclStmt
/// associated with the creation of that condition variable.
Stmt* SubExprs[END_EXPR];
SourceLocation WhileLoc;
public:
- WhileStmt(const ASTContext &C, VarDecl *Var, Expr *cond, Stmt *body,
+ WhileStmt(ASTContext &C, VarDecl *Var, Expr *cond, Stmt *body,
SourceLocation WL);
/// \brief Build an empty while statement.
/// }
/// \endcode
VarDecl *getConditionVariable() const;
- void setConditionVariable(const ASTContext &C, VarDecl *V);
+ void setConditionVariable(ASTContext &C, VarDecl *V);
/// If this WhileStmt has a condition variable, return the faux DeclStmt
/// associated with the creation of that condition variable.
SourceLocation LParenLoc, RParenLoc;
public:
- ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar,
- Expr *Inc, Stmt *Body, SourceLocation FL, SourceLocation LP,
- SourceLocation RP);
+ ForStmt(ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar, Expr *Inc,
+ Stmt *Body, SourceLocation FL, SourceLocation LP, SourceLocation RP);
/// \brief Build an empty for statement.
explicit ForStmt(EmptyShell Empty) : Stmt(ForStmtClass, Empty) { }
/// }
/// \endcode
VarDecl *getConditionVariable() const;
- void setConditionVariable(const ASTContext &C, VarDecl *V);
+ void setConditionVariable(ASTContext &C, VarDecl *V);
/// If this ForStmt has a condition variable, return the faux DeclStmt
/// associated with the creation of that condition variable.
//===--- Asm String Analysis ---===//
/// Assemble final IR asm string.
- std::string generateAsmString(const ASTContext &C) const;
+ std::string generateAsmString(ASTContext &C) const;
//===--- Output operands ---===//
friend class ASTStmtReader;
public:
- GCCAsmStmt(const ASTContext &C, SourceLocation asmloc, bool issimple,
+ GCCAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
bool isvolatile, unsigned numoutputs, unsigned numinputs,
IdentifierInfo **names, StringLiteral **constraints, Expr **exprs,
StringLiteral *asmstr, unsigned numclobbers,
/// translation of strings from GCC syntax to LLVM IR syntax, and handles
//// flattening of named references like %[foo] to Operand AsmStringPiece's.
unsigned AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces,
- const ASTContext &C, unsigned &DiagOffs) const;
+ ASTContext &C, unsigned &DiagOffs) const;
/// Assemble final IR asm string.
- std::string generateAsmString(const ASTContext &C) const;
+ std::string generateAsmString(ASTContext &C) const;
//===--- Output operands ---===//
}
private:
- void setOutputsAndInputsAndClobbers(const ASTContext &C,
+ void setOutputsAndInputsAndClobbers(ASTContext &C,
IdentifierInfo **Names,
StringLiteral **Constraints,
Stmt **Exprs,
friend class ASTStmtReader;
public:
- MSAsmStmt(const ASTContext &C, SourceLocation asmloc, SourceLocation
- lbraceloc, bool issimple, bool isvolatile, ArrayRef<Token> asmtoks,
+ MSAsmStmt(ASTContext &C, SourceLocation asmloc, SourceLocation lbraceloc,
+ bool issimple, bool isvolatile, ArrayRef<Token> asmtoks,
unsigned numoutputs, unsigned numinputs,
ArrayRef<StringRef> constraints,
ArrayRef<Expr*> exprs, StringRef asmstr,
StringRef getAsmString() const { return AsmStr; }
/// Assemble final IR asm string.
- std::string generateAsmString(const ASTContext &C) const;
+ std::string generateAsmString(ASTContext &C) const;
//===--- Output operands ---===//
StringRef getClobber(unsigned i) const { return getClobbers()[i]; }
private:
- void initialize(const ASTContext &C,
+ void initialize(ASTContext &C,
StringRef AsmString,
ArrayRef<Token> AsmToks,
ArrayRef<StringRef> Constraints,
explicit SEHExceptStmt(EmptyShell E) : Stmt(SEHExceptStmtClass, E) { }
public:
- static SEHExceptStmt* Create(const ASTContext &C,
+ static SEHExceptStmt* Create(ASTContext &C,
SourceLocation ExceptLoc,
Expr *FilterExpr,
Stmt *Block);
explicit SEHFinallyStmt(EmptyShell E) : Stmt(SEHFinallyStmtClass, E) { }
public:
- static SEHFinallyStmt* Create(const ASTContext &C,
+ static SEHFinallyStmt* Create(ASTContext &C,
SourceLocation FinallyLoc,
Stmt *Block);
explicit SEHTryStmt(EmptyShell E) : Stmt(SEHTryStmtClass, E) { }
public:
- static SEHTryStmt* Create(const ASTContext &C, bool isCXXTry,
- SourceLocation TryLoc, Stmt *TryBlock,
+ static SEHTryStmt* Create(ASTContext &C,
+ bool isCXXTry,
+ SourceLocation TryLoc,
+ Stmt *TryBlock,
Stmt *Handler);
SourceLocation getLocStart() const LLVM_READONLY { return getTryLoc(); }
void setCapturedStmt(Stmt *S) { getStoredStmts()[NumCaptures] = S; }
public:
- static CapturedStmt *Create(const ASTContext &Context, Stmt *S,
+ static CapturedStmt *Create(ASTContext &Context, Stmt *S,
CapturedRegionKind Kind,
ArrayRef<Capture> Captures,
ArrayRef<Expr *> CaptureInits,
CapturedDecl *CD, RecordDecl *RD);
- static CapturedStmt *CreateDeserialized(const ASTContext &Context,
+ static CapturedStmt *CreateDeserialized(ASTContext &Context,
unsigned NumCaptures);
/// \brief Retrieve the statement being captured.