[LLVMdev] API design
Chris Lattner
sabre at nondot.org
Mon Jul 2 18:44:53 PDT 2007
On Mon, 2 Jul 2007, Reid Spencer wrote:
> I'd actually prefer a new constructor here. One that doesn't take any
> Args at all. API wise its a little more clear what's going on, so you'd
> have:
>
> if (Args.size())
> new CallInst(V, &Args[0], Args.size());
> else
> new CallInst(V);
>
> Or any other permutation using ternary operator and/or macros.
The point is to not have conditional code.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list