Page MenuHomePhabricator

Make getLastArgNoClaim work for up to 4 arguments.
ClosedPublic

Authored by filcab on Mar 20 2015, 3:47 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

filcab updated this revision to Diff 22393.Mar 20 2015, 3:47 PM
filcab retitled this revision from to Make getLastArgNoClaim work for up to 4 arguments..
filcab updated this object.
filcab edited the test plan for this revision. (Show Details)
filcab added a subscriber: Unknown Object (MLST).
samsonov accepted this revision.Mar 20 2015, 4:29 PM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 20 2015, 4:29 PM
This revision was automatically updated to reflect the committed changes.
Bigcheese edited edge metadata.Mar 20 2015, 4:36 PM

Why not make this a variadic template?

Why not make this a variadic template?

A variadic "matches" method on Option would keep it from being
amazingly inefficient. (i.e. don't iterate through ArgList N times.)

silvas added a subscriber: silvas.Mar 23 2015, 4:27 PM

Why not make this a variadic template?

A variadic "matches" method on Option would keep it from being
amazingly inefficient. (i.e. don't iterate through ArgList N times.)

The real solution is to not have to walk the list for every method call like this. I.e. use a data structure that efficiently supports these sorts of queries.

Why not make this a variadic template?

A variadic "matches" method on Option would keep it from being
amazingly inefficient. (i.e. don't iterate through ArgList N times.)

The real solution is to not have to walk the list for every method call like this. I.e. use a data structure that efficiently supports these sorts of queries.

Well, sure. I just didn't want Michael's comment to prompt an inductive template on getLastArg, which would be worse.