Hi, > What I'm missing is, therefore, how do I get a ConstantInt out of a Constant > obtained via ConstantExpr::getPointerCast? you can't. A ConstantInt is not the same thing as a Constant with integer type. A ConstantInt is a constant which is just a number, such as 3. Ciao, Duncan.