diff options
Diffstat (limited to 'include/llvm/Operator.h')
-rw-r--r-- | include/llvm/Operator.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index 932c2ace8c..c62164bcbc 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -181,6 +181,15 @@ public: class GEPOperator : public Operator { public: + /// isInBounds - Test whether this is an inbounds GEP, as defined + /// by LangRef.html. + bool isInBounds() const { + return SubclassOptionalData & (1 << 0); + } + void setIsInBounds(bool B) { + SubclassOptionalData = (SubclassOptionalData & ~(1 << 0)) | (B << 0); + } + inline op_iterator idx_begin() { return op_begin()+1; } inline const_op_iterator idx_begin() const { return op_begin()+1; } inline op_iterator idx_end() { return op_end(); } |