diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-25 06:16:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-25 06:16:32 +0000 |
commit | 3d5ed2250e78c3e849232398cb550238155dbb72 (patch) | |
tree | 1e1ec9d242f369169792b6d3245bd8a4fef4ad94 /include/llvm/Constants.h | |
parent | 4ca829e89567f002fc74eb0e3e532a7c7662e031 (diff) | |
download | external_llvm-3d5ed2250e78c3e849232398cb550238155dbb72.zip external_llvm-3d5ed2250e78c3e849232398cb550238155dbb72.tar.gz external_llvm-3d5ed2250e78c3e849232398cb550238155dbb72.tar.bz2 |
constify some methods and add a new Constant::getAggregateElement
helper method for the common operation of extracting an element
out of a constant aggregate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r-- | include/llvm/Constants.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 1823f1d..a685ccc 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -316,19 +316,19 @@ public: /// getSequentialElement - If this CAZ has array or vector type, return a zero /// with the right element type. - Constant *getSequentialElement(); + Constant *getSequentialElement() const; /// getStructElement - If this CAZ has struct type, return a zero with the /// right element type for the specified element. - Constant *getStructElement(unsigned Elt); + Constant *getStructElement(unsigned Elt) const; /// getElementValue - Return a zero of the right value for the specified GEP /// index. - Constant *getElementValue(Constant *C); + Constant *getElementValue(Constant *C) const; /// getElementValue - Return a zero of the right value for the specified GEP /// index. - Constant *getElementValue(unsigned Idx); + Constant *getElementValue(unsigned Idx) const; /// Methods for support type inquiry through isa, cast, and dyn_cast: /// @@ -1157,19 +1157,19 @@ public: /// getSequentialElement - If this Undef has array or vector type, return a /// undef with the right element type. - UndefValue *getSequentialElement(); + UndefValue *getSequentialElement() const; /// getStructElement - If this undef has struct type, return a undef with the /// right element type for the specified element. - UndefValue *getStructElement(unsigned Elt); + UndefValue *getStructElement(unsigned Elt) const; /// getElementValue - Return an undef of the right value for the specified GEP /// index. - UndefValue *getElementValue(Constant *C); + UndefValue *getElementValue(Constant *C) const; /// getElementValue - Return an undef of the right value for the specified GEP /// index. - UndefValue *getElementValue(unsigned Idx); + UndefValue *getElementValue(unsigned Idx) const; virtual void destroyConstant(); |