[llvm-commits] CVS: llvm/include/llvm/Constants.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 23 09:50:01 PDT 2003
Changes in directory llvm/include/llvm:
Constants.h updated: 1.27 -> 1.28
---
Log message:
Add more doxygen comments, add new ConstantInt::getRawValue method
---
Diffs of the changes:
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.27 llvm/include/llvm/Constants.h:1.28
--- llvm/include/llvm/Constants.h:1.27 Sat Jun 21 22:07:32 2003
+++ llvm/include/llvm/Constants.h Wed Jul 23 09:49:06 2003
@@ -131,6 +131,11 @@
///
static ConstantInt *get(const Type *Ty, unsigned char V);
+ /// getRawValue - return the underlying value of this constant as a 64-bit
+ /// unsigned integer value.
+ ///
+ inline uint64_t getRawValue() const { return Val.Unsigned; }
+
/// isNullValue - Return true if this is the value that would be returned by
/// getNullValue.
virtual bool isNullValue() const { return Val.Unsigned == 0; }
@@ -157,12 +162,15 @@
ConstantSInt(const Type *Ty, int64_t V);
public:
/// get() - Static factory methods - Return objects of the specified value
+ ///
static ConstantSInt *get(const Type *Ty, int64_t V);
/// isValueValidForType - return true if Ty is big enough to represent V.
+ ///
static bool isValueValidForType(const Type *Ty, int64_t V);
/// getValue - return the underlying value of this constant.
+ ///
inline int64_t getValue() const { return Val.Signed; }
virtual bool isAllOnesValue() const { return getValue() == -1; }
@@ -188,6 +196,7 @@
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
+ ///
static inline bool classof(const ConstantSInt *) { return true; }
static bool classof(const Constant *CPV); // defined in Constants.cpp
static inline bool classof(const Value *V) {
@@ -205,12 +214,15 @@
ConstantUInt(const Type *Ty, uint64_t V);
public:
/// get() - Static factory methods - Return objects of the specified value
+ ///
static ConstantUInt *get(const Type *Ty, uint64_t V);
/// isValueValidForType - return true if Ty is big enough to represent V.
+ ///
static bool isValueValidForType(const Type *Ty, uint64_t V);
/// getValue - return the underlying value of this constant.
+ ///
inline uint64_t getValue() const { return Val.Unsigned; }
/// isMaxValue - Return true if this is the largest value that may be
More information about the llvm-commits
mailing list