<div dir="ltr">I want to create an add instruction that takes two constant operands at the LLVM IR level. I use the IRBuilder class, but nothing happens. Here is part of the runOnFunction() method of my function pass:<br><div><div>...</div><div>LLVMContext &Context = F.getContext();</div><div>IRBuilder<> builder(&Instruction);</div><div>Value *Lef = ConstantInt::get(Type::getInt32Ty(Context), 4);</div><div>Value *Rig = ConstantInt::get(Type::getInt32Ty(Context), 5);</div><div>Value *Result = builder.CreateAdd(Lef, Rig);</div><div>...</div><div>It seems that the problem is with the ConstantInt::get() function. Any idea?</div></div></div>