X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FIR%2FArgument.h;h=fc04fe71cbf06d2ec3252f77c027c46399064591;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=3a63e1a1eaa29e77f9d4a5f5bf11d4cf9c3e551f;hpb=fe47ebfad39184dfca0733c5ef943a074bfcc187;p=oota-llvm.git diff --git a/include/llvm/IR/Argument.h b/include/llvm/IR/Argument.h index 3a63e1a1eaa..fc04fe71cbf 100644 --- a/include/llvm/IR/Argument.h +++ b/include/llvm/IR/Argument.h @@ -56,9 +56,20 @@ public: unsigned getArgNo() const; /// \brief Return true if this argument has the nonnull attribute on it in - /// its containing function. + /// its containing function. Also returns true if at least one byte is known + /// to be dereferenceable and the pointer is in addrspace(0). bool hasNonNullAttr() const; + /// \brief If this argument has the dereferenceable attribute on it in its + /// containing function, return the number of bytes known to be + /// dereferenceable. Otherwise, zero is returned. + uint64_t getDereferenceableBytes() const; + + /// \brief If this argument has the dereferenceable_or_null attribute on + /// it in its containing function, return the number of bytes known to be + /// dereferenceable. Otherwise, zero is returned. + uint64_t getDereferenceableOrNullBytes() const; + /// \brief Return true if this argument has the byval attribute on it in its /// containing function. bool hasByValAttr() const; @@ -99,6 +110,14 @@ public: /// its containing function. bool hasInAllocaAttr() const; + /// \brief Return true if this argument has the zext attribute on it in its + /// containing function. + bool hasZExtAttr() const; + + /// \brief Return true if this argument has the sext attribute on it in its + /// containing function. + bool hasSExtAttr() const; + /// \brief Add a Attribute to an argument. void addAttr(AttributeSet AS);