mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
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
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
|
||||
if (Ty == Type::BoolTy)
|
||||
if (Ty == Type::Int1Ty)
|
||||
return ConstantInt::getTrue();
|
||||
if (Ty->isInteger()) {
|
||||
if (isSigned) {
|
||||
@@ -48,7 +48,7 @@ static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
|
||||
|
||||
// Static constructor to create the minimum constant for an integral type...
|
||||
static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
|
||||
if (Ty == Type::BoolTy)
|
||||
if (Ty == Type::Int1Ty)
|
||||
return ConstantInt::getFalse();
|
||||
if (Ty->isInteger()) {
|
||||
if (isSigned) {
|
||||
@@ -63,7 +63,7 @@ static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
|
||||
return 0;
|
||||
}
|
||||
static ConstantInt *Next(ConstantInt *CI) {
|
||||
if (CI->getType() == Type::BoolTy)
|
||||
if (CI->getType() == Type::Int1Ty)
|
||||
return ConstantInt::get(!CI->getBoolValue());
|
||||
|
||||
Constant *Result = ConstantExpr::getAdd(CI,
|
||||
@@ -205,7 +205,7 @@ ConstantInt *ConstantRange::getSingleElement() const {
|
||||
///
|
||||
uint64_t ConstantRange::getSetSize() const {
|
||||
if (isEmptySet()) return 0;
|
||||
if (getType() == Type::BoolTy) {
|
||||
if (getType() == Type::Int1Ty) {
|
||||
if (Lower != Upper) // One of T or F in the set...
|
||||
return 1;
|
||||
return 2; // Must be full set...
|
||||
|
||||
Reference in New Issue
Block a user