I found 2 APIs in llvm::ConstantInt document:
static ConstantInt *ConstantInt::getTrue (LLVMContext &Context): https://llvm.org/doxygen/classllvm_1_1ConstantInt.html#a82dbbd8e3688b0bc1eedb338864d0d0cstatic Constant *ConstantInt::getTrue (Type *Ty): https://llvm.org/doxygen/classllvm_1_1ConstantInt.html#a1d728e83e9e0fa85b0b58b33ec9c3197
But I don't know what's the difference between these 2 APIs ?