Type *Int32Ty = Type::getInt32Ty(Context); Value *One = ConstantInt::get(Int32Ty, 1); SelectionDAG &DAG = ...; SDValue OnePtr = DAG.getIntPtrConstant(One);
int64_t Address = ...; unsigned PtrSize = 8; SelectionDAG &DAG = ...; SDValue AddrPtr = DAG.getIntPtrConstant(Address, PtrSize);This code creates an integer constant `Address`, then gets an `SDValue` representing a pointer to `Address` using a pointer size of 8 bytes. Overall, `SelectionDAG::getIntPtrConstant` is a useful method for creating pointer constants in LLVM IR.