diff options
Diffstat (limited to 'include/llvm/Constant.h')
-rw-r--r-- | include/llvm/Constant.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 7fecf4c7b4..bbd1b1a6e2 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -97,7 +97,15 @@ public: /// 'this' is a constant expr. Constant *getAggregateElement(unsigned Elt) const; Constant *getAggregateElement(Constant *Elt) const; - + + /// getSplatValue - If this is a splat vector constant, meaning that all of + /// the elements have the same value, return that value. Otherwise return 0. + Constant *getSplatValue() const; + + /// If C is a constant integer then return its value, otherwise C must be a + /// vector of constant integers, all equal, and the common value is returned. + const APInt &getUniqueInteger() const; + /// destroyConstant - Called if some element of this constant is no longer /// valid. At this point only other constants may be on the use_list for this /// constant. Any constants on our Use list must also be destroy'd. The |