<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57175>57175</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Aggregate type documentation could be improved?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vext01
</td>
</tr>
</table>
<pre>
I'm fairly new to LLVM and I'm just learning that there is more than one "array-like" type in the IR. I'm talking about *arrays* and *vectors*.
During my search to find the difference between these (which I now understand), I encountered the following passage in the [Aggregate types](https://llvm.org/docs/LangRef.html#aggregate-types) section of the language reference:
> Aggregate Types are a subset of derived types that can contain multiple member types. [Arrays](https://llvm.org/docs/LangRef.html#t-array) and [structs](https://llvm.org/docs/LangRef.html#t-struct) are aggregate types. [Vectors](https://llvm.org/docs/LangRef.html#t-vector) are not considered to be aggregate types.
Let's break it down.
## Aggregate Types are a subset of derived types that can contain multiple member types.
I think think this sentence may be incorrect, because an array is an aggregate type that cannot contain multiple member types. There can be only one element type.
Should the sentence instead read?:
> Aggregate Types are a subset of derived types that can contain multiple members.
Or maybe even:
> Some LLVM types can store multiple elements. A subset of these are considered to be "aggregate" types.
## Vectors are not considered to be aggregate types.
After reading the first sentence, a newbie will wonder why this is the case. After all, a vector, like an array, is a collection of elements, yet an array is aggregate and a vector is not.
Well, it did say it's a subset, but some additional clarifying prose may help for people new to LLVM?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VduOmzAQ_RryYm0E5P7AQ7rbSCttVamt2mdjBnDX2JFtQvn7ztghG9SqDytVQtzsuZyZM8elqcbiOcl3Hau5tGpkGgbmDXt5-f6JcV2xuPizd54p4FZL3TDfco83sMCkY53BJ_7SzGhgSZ5za_n4oOQr4Afz4xm3adrPnr8srw49V6_kipem92h0DEYOX0JUfF5AeGPpzzJJn5L0GO9PvSW7bmQO0xEtJVtLNCH_laxrzEoLYCX4ASCE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