diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-27 21:53:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-27 21:53:46 +0000 |
commit | dd8004dc73d091ccb3927dbbc3b41639a3738ae3 (patch) | |
tree | 635ee4ff5a89aefb2eb5ba8394207f65c8771bcf /include/llvm/Operator.h | |
parent | 9a7e2ccf574368b60455f8c8975030475a1f3ce0 (diff) |
Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
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(); } |