forked from OSchip/llvm-project
Add const versions of Expr::getInits() and Expr::inits()
llvm-svn: 285287
This commit is contained in:
parent
46c0278e7d
commit
5bd830a5c5
|
@ -3783,10 +3783,19 @@ public:
|
|||
/// \brief Retrieve the set of initializers.
|
||||
Expr **getInits() { return reinterpret_cast<Expr **>(InitExprs.data()); }
|
||||
|
||||
/// \brief Retrieve the set of initializers.
|
||||
Expr * const *getInits() const {
|
||||
return reinterpret_cast<Expr * const *>(InitExprs.data());
|
||||
}
|
||||
|
||||
ArrayRef<Expr *> inits() {
|
||||
return llvm::makeArrayRef(getInits(), getNumInits());
|
||||
}
|
||||
|
||||
ArrayRef<Expr *> inits() const {
|
||||
return llvm::makeArrayRef(getInits(), getNumInits());
|
||||
}
|
||||
|
||||
const Expr *getInit(unsigned Init) const {
|
||||
assert(Init < getNumInits() && "Initializer access out of range!");
|
||||
return cast_or_null<Expr>(InitExprs[Init]);
|
||||
|
|
Loading…
Reference in New Issue