summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
commit4fe16d607d11e29d742208894909733f5ad01f8f (patch)
treea669ba57373e87d31c3af6f301fe4a61f773f4b3 /include
parent34dceb47573b0aedd188b5e72bb848ba29a4960f (diff)
downloadllvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.gz
llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.bz2
llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.xz
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h10
-rw-r--r--include/llvm/ExecutionEngine/GenericValue.h2
-rw-r--r--include/llvm/Intrinsics.td2
-rw-r--r--include/llvm/Target/TargetLowering.h2
-rw-r--r--include/llvm/Type.h12
5 files changed, 14 insertions, 14 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index e8d1460d8f..337a62c511 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -102,13 +102,13 @@ public:
static ConstantInt *CI = 0;
if (CI) return CI;
return CI = new ConstantInt(getType(),
- Val ^ (getType() == Type::BoolTy ? 1 : -1));
+ Val ^ (getType() == Type::Int1Ty ? 1 : -1));
}
/// @returns the value of this ConstantInt only if it's a boolean type.
/// @brief return the boolean value of this constant.
inline bool getBoolValue() const {
- assert(getType() == Type::BoolTy && "Should be a boolean constant!");
+ assert(getType() == Type::Int1Ty && "Should be a boolean constant!");
return static_cast<bool>(getZExtValue());
}
@@ -137,7 +137,7 @@ public:
/// @returns true iff this constant's bits are all set to true.
/// @brief Determine if the value is all ones.
virtual bool isAllOnesValue() const {
- if (getType() == Type::BoolTy) return getBoolValue() == true;
+ if (getType() == Type::Int1Ty) return getBoolValue() == true;
return getSExtValue() == -1;
}
@@ -147,7 +147,7 @@ public:
/// by this type.
/// @brief Determine if the value is maximal.
virtual bool isMaxValue(bool isSigned) const {
- if (getType() == Type::BoolTy) return getBoolValue() == true;
+ if (getType() == Type::Int1Ty) return getBoolValue() == true;
if (isSigned) {
int64_t V = getSExtValue();
if (V < 0) return false; // Be careful about wrap-around on 'long's
@@ -163,7 +163,7 @@ public:
/// this type.
/// @brief Determine if the value is minimal.
virtual bool isMinValue(bool isSigned) const {
- if (getType() == Type::BoolTy) return getBoolValue() == false;
+ if (getType() == Type::Int1Ty) return getBoolValue() == false;
if (isSigned) {
int64_t V = getSExtValue();
if (V > 0) return false; // Be careful about wrap-around on 'long's
diff --git a/include/llvm/ExecutionEngine/GenericValue.h b/include/llvm/ExecutionEngine/GenericValue.h
index 9a162cafce..9cd0672e93 100644
--- a/include/llvm/ExecutionEngine/GenericValue.h
+++ b/include/llvm/ExecutionEngine/GenericValue.h
@@ -22,7 +22,7 @@ namespace llvm {
typedef uintptr_t PointerTy;
union GenericValue {
- bool BoolVal;
+ bool Int1Val;
unsigned char Int8Val;
unsigned short Int16Val;
unsigned int Int32Val;
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index e08fe2d4d5..ca6725b648 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -64,7 +64,7 @@ class LLVMPackedType<ValueType VT, int numelts, LLVMType elty>
}
def llvm_void_ty : LLVMType<isVoid, "Type::VoidTyID">;
-def llvm_bool_ty : LLVMType<i1 , "Type::BoolTyID">;
+def llvm_i1_ty : LLVMType<i1 , "Type::Int1TyID">;
def llvm_i8_ty : LLVMType<i8 , "Type::Int8TyID">;
def llvm_i16_ty : LLVMType<i16, "Type::Int16TyID">;
def llvm_i32_ty : LLVMType<i32, "Type::Int32TyID">;
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 0f481bbf19..6880cddf23 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -342,7 +342,7 @@ public:
switch (Ty->getTypeID()) {
default: assert(0 && "Unknown type!");
case Type::VoidTyID: return MVT::isVoid;
- case Type::BoolTyID: return MVT::i1;
+ case Type::Int1TyID: return MVT::i1;
case Type::Int8TyID: return MVT::i8;
case Type::Int16TyID: return MVT::i16;
case Type::Int32TyID: return MVT::i32;
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index 0c1b1d58bc..29180a00e5 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -71,7 +71,7 @@ public:
///
enum TypeID {
// PrimitiveTypes .. make sure LastPrimitiveTyID stays up to date
- VoidTyID = 0 , BoolTyID, // 0, 1: Basics...
+ VoidTyID = 0 , Int1TyID, // 0, 1: Basics...
Int8TyID, // 2 : 8 bit type...
Int16TyID, // 3 : 16 bit type...
Int32TyID, // 4 : 32 bit type...
@@ -165,9 +165,9 @@ public:
bool isInteger() const { return ID >= Int8TyID && ID <= Int64TyID; }
/// isIntegral - Returns true if this is an integral type, which is either
- /// BoolTy or one of the Integer types.
+ /// Int1Ty or one of the Integer types.
///
- bool isIntegral() const { return isInteger() || this == BoolTy; }
+ bool isIntegral() const { return isInteger() || this == Int1Ty; }
/// isFloatingPoint - Return true if this is one of the two floating point
/// types
@@ -209,7 +209,7 @@ public:
///
bool isSized() const {
// If it's a primitive, it is always sized.
- if (ID >= BoolTyID && ID <= DoubleTyID || ID == PointerTyID)
+ if (ID >= Int1TyID && ID <= DoubleTyID || ID == PointerTyID)
return true;
// If it is not something that can have a size (e.g. a function or label),
// it doesn't have a size.
@@ -248,7 +248,7 @@ public:
/// will be promoted to if passed through a variable argument
/// function.
const Type *getVAArgsPromotedType() const {
- if (ID == BoolTyID || ID == Int8TyID || ID == Int16TyID)
+ if (ID == Int1TyID || ID == Int8TyID || ID == Int16TyID)
return Type::Int32Ty;
else if (ID == FloatTyID)
return Type::DoubleTy;
@@ -288,7 +288,7 @@ public:
//===--------------------------------------------------------------------===//
// These are the builtin types that are always available...
//
- static Type *VoidTy , *BoolTy;
+ static Type *VoidTy , *Int1Ty;
static Type *Int8Ty , *Int16Ty,
*Int32Ty, *Int64Ty;
static Type *FloatTy, *DoubleTy;