mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 04:09:04 +00:00
Return null on failure, instead of aborting.
llvm-svn: 3308
This commit is contained in:
parent
afb9cae44d
commit
26186786e1
@ -106,9 +106,7 @@ ConstantIntegral *ConstantIntegral::getMaxValue(const Type *Ty) {
|
||||
case Type::UIntTyID:
|
||||
case Type::ULongTyID: return getAllOnesValue(Ty);
|
||||
|
||||
default:
|
||||
assert(0 && "Non-integral type specified!");
|
||||
return 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,9 +130,7 @@ ConstantIntegral *ConstantIntegral::getMinValue(const Type *Ty) {
|
||||
case Type::UIntTyID:
|
||||
case Type::ULongTyID: return ConstantUInt::get(Ty, 0);
|
||||
|
||||
default:
|
||||
assert(0 && "Non-integral type specified!");
|
||||
return 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,9 +153,7 @@ ConstantIntegral *ConstantIntegral::getAllOnesValue(const Type *Ty) {
|
||||
Val >>= 64-TypeBits; // Shift out unwanted 1 bits...
|
||||
return ConstantUInt::get(Ty, Val);
|
||||
}
|
||||
default:
|
||||
assert(0 && "Non-integral type specified!");
|
||||
return 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user