[LLVMdev] API design
rspencer at reidspencer.com
Mon Jul 2 18:06:45 PDT 2007
On Tue, 2007-07-03 at 09:04 +1200, Keith Bauer wrote:
> > > I'd like to get the extra checks working so that they can help find our
> > > more subtle bugs. Any idea what we should do here?
> > I don't really have a good idea, but I also don't want to significantly
> > uglify the sourcebase...
> #define V_CALLINST(V, Args) new CallInst(V, Args.size() == 0 ? NULL :
> &Args, Args.size())
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
new CallInst(V, &Args, Args.size());
Or any other permutation using ternary operator and/or macros.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev