Home | History | Annotate | Download | only in llvm

Lines Matching refs:Constant

1 //===-- llvm/Constant.h - Constant class definition -------------*- C++ -*-===//
10 // This file contains the declaration of the Constant class.
25 /// of all constant values in an LLVM program. A constant is a value that is
32 /// or expression based (computations yielding a constant value composed of
33 /// only certain operators and other constant values).
40 /// @brief LLVM Constant Representation
41 class Constant : public User {
42 void operator=(const Constant &); // Do not implement
43 Constant(const Constant &); // Do not implement
47 Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
64 /// canTrap - Return true if evaluation of this constant could trap. This is
65 /// true for things like constant expressions that could divide by zero.
68 /// isConstantUsed - Return true if the constant has users other than constant
83 /// NoRelocation: This constant pool entry is guaranteed to never have a
84 /// relocation applied to it (because it holds a simple constant like
95 /// constant that corresponds to the specified element if possible, or null if
97 /// 'this' is a constant expr.
98 Constant *getAggregateElement(unsigned Elt) const;
99 Constant *getAggregateElement(Constant *Elt) const;
101 /// destroyConstant - Called if some element of this constant is no longer
103 /// constant. Any constants on our Use list must also be destroy'd. The
104 /// implementation must be sure to remove the constant from the list of
111 static inline bool classof(const Constant *) { return true; }
121 /// a new constant that is equivalent to the current one, with all uses of
123 /// of the users of 'this' are replaced to use the new constant, and then
138 static Constant *getNullValue(Type* Ty);
140 /// @returns the value for an integer or vector of integer constant of the
143 static Constant *getAllOnesValue(Type* Ty);
145 /// getIntegerValue - Return the value for an integer or pointer constant,
147 static Constant *getIntegerValue(Type* Ty, const APInt &V);
149 /// removeDeadConstantUsers - If there are any dead constant users dangling
150 /// off of this constant, remove them. This method is useful for clients