[LLVMdev] TableGen List Manipulation

David Greene dag at cray.com
Fri May 8 17:18:00 PDT 2009


I see that one can take slices of lists, but is there
any way to conditionally take a slice?

For example, let's say I have this (fictitious) code:

class FOO<list<string> names> {
  string First = names[0];
  string Middle = !if(!eq(!length(names), 3), names[1], "");
  string Last = !last(names);
}

Is there currently a way to implement this behavior or should I
code up some new operators?

                             -Dave



More information about the llvm-dev mailing list