+ /// ContainsRelocations - Return true if the constant value contains
+ /// relocations which cannot be resolved at compile time. Note that answer is
+ /// not exclusive: there can be possibility that relocations of other kind are
+ /// required as well.
+ bool ContainsRelocations(unsigned Kind = Reloc::LocalOrGlobal) const;
+
+ // Specialize get/setOperand for Constants as their operands are always
+ // constants as well.
+ Constant *getOperand(unsigned i) {
+ return static_cast<Constant*>(User::getOperand(i));
+ }
+ const Constant *getOperand(unsigned i) const {
+ return static_cast<const Constant*>(User::getOperand(i));
+ }
+ void setOperand(unsigned i, Constant *C) {
+ User::setOperand(i, C);
+ }
+
+ /// getVectorElements - This method, which is only valid on constant of vector
+ /// type, returns the elements of the vector in the specified smallvector.
+ /// This handles breaking down a vector undef into undef elements, etc. For
+ /// constant exprs and other cases we can't handle, we return an empty vector.
+ void getVectorElements(LLVMContext &Context,
+ SmallVectorImpl<Constant*> &Elts) const;