summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Constant.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Constant.h')
-rw-r--r--include/llvm/IR/Constant.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/include/llvm/IR/Constant.h b/include/llvm/IR/Constant.h
index bb88905aa57a0..3c5fe556d50fd 100644
--- a/include/llvm/IR/Constant.h
+++ b/include/llvm/IR/Constant.h
@@ -48,42 +48,41 @@ protected:
: User(ty, vty, Ops, NumOps) {}
public:
- /// isNullValue - Return true if this is the value that would be returned by
- /// getNullValue.
+ /// Return true if this is the value that would be returned by getNullValue.
bool isNullValue() const;
- /// \brief Returns true if the value is one.
+ /// Returns true if the value is one.
bool isOneValue() const;
- /// isAllOnesValue - Return true if this is the value that would be returned by
+ /// Return true if this is the value that would be returned by
/// getAllOnesValue.
bool isAllOnesValue() const;
- /// isNegativeZeroValue - Return true if the value is what would be returned
- /// by getZeroValueForNegation.
+ /// Return true if the value is what would be returned by
+ /// getZeroValueForNegation.
bool isNegativeZeroValue() const;
/// Return true if the value is negative zero or null value.
bool isZeroValue() const;
- /// \brief Return true if the value is not the smallest signed value.
+ /// Return true if the value is not the smallest signed value.
bool isNotMinSignedValue() const;
- /// \brief Return true if the value is the smallest signed value.
+ /// Return true if the value is the smallest signed value.
bool isMinSignedValue() const;
- /// canTrap - Return true if evaluation of this constant could trap. This is
- /// true for things like constant expressions that could divide by zero.
+ /// Return true if evaluation of this constant could trap. This is true for
+ /// things like constant expressions that could divide by zero.
bool canTrap() const;
- /// isThreadDependent - Return true if the value can vary between threads.
+ /// Return true if the value can vary between threads.
bool isThreadDependent() const;
/// Return true if the value is dependent on a dllimport variable.
bool isDLLImportDependent() const;
- /// isConstantUsed - Return true if the constant has users other than constant
- /// exprs and other dangling things.
+ /// Return true if the constant has users other than constant expressions and
+ /// other dangling things.
bool isConstantUsed() const;
/// This method classifies the entry according to whether or not it may
@@ -93,15 +92,14 @@ public:
/// FIXME: This really should not be in IR.
bool needsRelocation() const;
- /// getAggregateElement - For aggregates (struct/array/vector) return the
- /// constant that corresponds to the specified element if possible, or null if
- /// not. This can return null if the element index is a ConstantExpr, or if
- /// 'this' is a constant expr.
+ /// For aggregates (struct/array/vector) return the constant that corresponds
+ /// to the specified element if possible, or null if not. This can return null
+ /// if the element index is a ConstantExpr, or if '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.
+ /// 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
@@ -133,7 +131,7 @@ public:
/// use Value::replaceAllUsesWith, which automatically dispatches to this
/// method as needed.
///
- void handleOperandChange(Value *, Value *, Use *);
+ void handleOperandChange(Value *, Value *);
static Constant *getNullValue(Type* Ty);
@@ -142,14 +140,14 @@ public:
/// @brief Get the all ones value
static Constant *getAllOnesValue(Type* Ty);
- /// getIntegerValue - Return the value for an integer or pointer constant,
- /// or a vector thereof, with the given scalar value.
+ /// Return the value for an integer or pointer constant, or a vector thereof,
+ /// with the given scalar value.
static Constant *getIntegerValue(Type *Ty, const APInt &V);
- /// removeDeadConstantUsers - If there are any dead constant users dangling
- /// off of this constant, remove them. This method is useful for clients
- /// that want to check to see if a global is unused, but don't want to deal
- /// with potentially dead constants hanging off of the globals.
+ /// If there are any dead constant users dangling off of this constant, remove
+ /// them. This method is useful for clients that want to check to see if a
+ /// global is unused, but don't want to deal with potentially dead constants
+ /// hanging off of the globals.
void removeDeadConstantUsers() const;
Constant *stripPointerCasts() {