summaryrefslogtreecommitdiff
path: root/include/llvm/Constants.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-01-24 04:43:41 +0000
committerChris Lattner <sabre@nondot.org>2012-01-24 04:43:41 +0000
commit45bb5c5333fba7e9909cca178d785bf2c1d2b0c1 (patch)
treefa1e29413e273f31a56acfe03cfc080aa501da08 /include/llvm/Constants.h
parentdfc8e470b6fcccdba23d5dc4bc5d4e47db7e6544 (diff)
downloadllvm-45bb5c5333fba7e9909cca178d785bf2c1d2b0c1.tar.gz
llvm-45bb5c5333fba7e9909cca178d785bf2c1d2b0c1.tar.bz2
llvm-45bb5c5333fba7e9909cca178d785bf2c1d2b0c1.tar.xz
implement the ConstantDataSequential accessor methods.
No need for 'getOperand' :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r--include/llvm/Constants.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 022ac2d393..1fc3308494 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -597,6 +597,10 @@ public:
inline SequentialType *getType() const {
return reinterpret_cast<SequentialType*>(Value::getType());
}
+
+ /// getElementType - Return the element type of the array/vector.
+ Type *getElementType() const;
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
///
@@ -605,6 +609,9 @@ public:
return V->getValueID() == ConstantDataArrayVal ||
V->getValueID() == ConstantDataVectorVal;
}
+private:
+ uint64_t getElementByteSize() const;
+ const char *getElementPointer(unsigned Elt) const;
};
//===----------------------------------------------------------------------===//