16 #ifndef LLVM_ANALYSIS_CONSTANTSSCANNER_H
17 #define LLVM_ANALYSIS_CONSTANTSSCANNER_H
26 const Constant, ptrdiff_t> {
32 inline bool isAtConstant()
const {
34 "isAtConstant called with invalid arguments!");
35 return isa<Constant>(InstI->
getOperand(OpIdx));
55 assert(isAtConstant() &&
"Dereferenced an iterator at the end!");
56 return cast<Constant>(InstI->
getOperand(OpIdx));
64 while (OpIdx < NumOperands && !isAtConstant()) {
68 if (OpIdx < NumOperands)
return *
this;
71 }
while (!InstI.
atEnd());
77 _Self tmp = *
this; ++*
this;
return tmp;
constant_iterator(const Function *F)
bool operator==(const _Self &x) const
unsigned getNumOperands() const
pointer operator->() const
pointer operator*() const
bool operator!=(const _Self &x) const
inst_iterator inst_begin(Function *F)
constant_iterator constant_begin(const Function *F)
Value * getOperand(unsigned i) const
constant_iterator constant_end(const Function *F)
constant_iterator(const Function *F, bool)
inst_iterator inst_end(Function *F)