Lines Matching defs:ConstantInt

80   if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
93 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
117 return ConstantInt::get(Ty, 0);
153 Constant *C = ConstantInt::get(Ty->getContext(), V);
168 return ConstantInt::get(Ty->getContext(),
209 if (ConstantInt *CI = dyn_cast<ConstantInt>(Elt))
267 if (!isa<ConstantInt>(CE->getOperand(1)) ||CE->getOperand(1)->isNullValue())
421 // ConstantInt
424 void ConstantInt::anchor() { }
426 ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V)
431 ConstantInt *ConstantInt::getTrue(LLVMContext &Context) {
434 pImpl->TheTrueVal = ConstantInt::get(Type::getInt1Ty(Context), 1);
438 ConstantInt *ConstantInt::getFalse(LLVMContext &Context) {
441 pImpl->TheFalseVal = ConstantInt::get(Type::getInt1Ty(Context), 0);
445 Constant *ConstantInt::getTrue(Type *Ty) {
449 return ConstantInt::getTrue(Ty->getContext());
454 ConstantInt::getTrue(Ty->getContext()));
457 Constant *ConstantInt::getFalse(Type *Ty) {
461 return ConstantInt::getFalse(Ty->getContext());
466 ConstantInt::getFalse(Ty->getContext()));
470 // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap
475 ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
480 ConstantInt *&Slot = Context.pImpl->IntConstants[Key];
481 if (!Slot) Slot = new ConstantInt(ITy, V);
485 Constant *ConstantInt::get(Type *Ty, uint64_t V, bool isSigned) {
495 ConstantInt *ConstantInt::get(IntegerType *Ty, uint64_t V,
500 ConstantInt *ConstantInt::getSigned(IntegerType *Ty, int64_t V) {
504 Constant *ConstantInt::getSigned(Type *Ty, int64_t V) {
508 Constant *ConstantInt::get(Type *Ty, const APInt& V) {
509 ConstantInt *C = get(Ty->getContext(), V);
511 "ConstantInt type doesn't match the type implied by its value!");
520 ConstantInt *ConstantInt::get(IntegerType* Ty, StringRef Str,
670 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
703 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
761 // Check to see if all of the elements are ConstantFP or ConstantInt and if
767 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
771 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
780 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
789 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
798 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
942 // Check to see if all of the elements are ConstantFP or ConstantInt and if
948 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
952 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
961 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
970 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
979 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
1019 if ((isa<ConstantFP>(V) || isa<ConstantInt>(V)) &&
1052 ConstantInt *CI = dyn_cast<ConstantInt>(*OI);
1153 bool ConstantInt::isValueValidForType(Type *Ty, uint64_t Val) {
1163 bool ConstantInt::isValueValidForType(Type *Ty, int64_t Val) {
1296 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
1300 assert(C && isa<ConstantInt>(C) && "Not a vector of numbers!");
1301 return cast<ConstantInt>(C)->getValue();
1740 Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1753 Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0);
1754 Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1762 return getOffsetOf(STy, ConstantInt::get(Type::getInt32Ty(STy->getContext()),
1770 ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0),
2100 return ConstantInt::get(Ty, 1);
2376 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
2476 return ConstantInt::get(getElementType(), getElementAsInteger(Elt));