ConstantInt::getBool
Constant::getIntegerValue
See also https://reviews.llvm.org/D156238#inline-1546774