[PATCH 1/2] TableGen: Generate a function for getting operand indices based on their defined names

Sean Silva silvas at purdue.edu
Thu Jun 20 11:10:15 PDT 2013


On Thu, Jun 20, 2013 at 10:58 AM, Tom Stellard <tom at stellard.net> wrote:

> Hi Sean,
>
> Attached is an updated patch which addresses your comments.
>
> On Wed, Jun 19, 2013 at 12:52:03PM -0700, Sean Silva wrote:
> > +.. code-block:: llvm
> >
> > This should be a `c++` code block, since this is c++ code (this
> determines
> > how it is syntax-highlighted).
> >
> > +  int DIndex = SP::getNamedOperandIdx(SP::XNORrr, SP::OpName::d);     //
> > => -1
> >
> > Does it even make sense to return -1 for "not found"?
> >
>
> Do you think we should be returning some other value for "not found"?
>

Sorry, let me rephrase. Does -1 ever get returned, or is it a "can't
happen"? My intuition is that generally if you are calling this function
you need a valid result, right?

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130620/7016954c/attachment.html>


More information about the llvm-commits mailing list