summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 14:49:06 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 14:49:06 +0000
commitaf28ac2201eafb90baa336975a3293467974acf7 (patch)
tree9f6cd0b8d3bfd5c09dda3737a21668df7aa58e88 /include
parent00f185fbfd99d21cda394eded77d1bc0ea2a4073 (diff)
downloadllvm-af28ac2201eafb90baa336975a3293467974acf7.tar.gz
llvm-af28ac2201eafb90baa336975a3293467974acf7.tar.bz2
llvm-af28ac2201eafb90baa336975a3293467974acf7.tar.xz
Add more doxygen comments, add new ConstantInt::getRawValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 77c39452d1..04e4397531 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -131,6 +131,11 @@ public:
///
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 @@ protected:
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 @@ public:
}
/// 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 @@ protected:
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