[llvm-commits] patch 2: langref "derived types" cleanup

Duncan Sands baldrick at free.fr
Sun Sep 27 05:31:07 PDT 2009


Hi Nick,

> +   function type is a <a href="#t_firstclass">first class type</a>,
> +   <a href="#t_void">void</a>, or <a href="#t_metadata">metadata</a>.

can a function really return metadata?

If the
> +   return type is a <a href="#t_struct">struct type</a> then the struct must
> +   have at least one element.  The argument of a function must be first class
> +   types.</p>

Why must a returned struct have an element?  I thought the plan was to
get rid of the "void" return type and return {} instead.

> -   underlying processor.  The elements of a structure may be any type that has a
> -   size.</p>
> +   underlying processor.  The elements of a structure may be any
> +   <a href="#t_firstclass">first class</a> type.</p>

So "first class" is the same as "has a size"?

>     elements) and an underlying primitive data type.  Vectors must have a power
> -   of two length (1, 2, 4, 8, 16 ...).  Vector types are considered
> -   <a href="#t_firstclass">first class</a>.</p>
> +   of two length (1, 2, 4, 8, 16 ...).</p>

Actually vectors don't have to have a power-of-two length anymore.

Ciao,

Duncan.



More information about the llvm-commits mailing list