<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/130199>130199</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [CIR] Upstream support for structure types
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            ClangIR
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          andykaylor
      </td>
    </tr>
</table>

<pre>
    ### Overview
Upstream the basic support for structure variable types. The initial change should just add support for declaring and initializing global variables that use a simple structure type. Follow-up patches can add support for local variables and accessing structs using the cir.get_member operation.

### Suggested minimal test case
```
// Global
struct S {
 int a;
  int b;
};
S s;
```

### Existing incubator tests
clang/test/CIR/CodeGen/struct.c
(clang/test/CIR/CodeGen/struct.cpp involves class support and should be deferred)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU8FupDgQ_RpzKQUZA93NgUMnWaI9rbTZPa8KUw3OGoxcdmd6vn5kuqcn0cxhJAtcluu9Vw8eMptxIWpF_Sjq5wxjmJxvcRku_-PFOp_1bri0QpXXBX-dyZ8NvQt5_Hfl4AlnCBNBj2w0cFxX5wOcnAcOPuoQPcEZvcHeEoTLSpzDPxOBWUwwaEFPuIwEPLloB3iLHACH4RPQQNqiN8sIuAzfG83XdDBa16O9EzCECQNEJkBgM6-WPshI7Dl0zlr3_hBXWDHoiRg0Lj9xWqc_4SZm1JqYE-0VkyFuVRpfG5-PFP6bae7Jg1vJYzBuyYU8pnX37zWOI3GgAWazmBktBOIAGpnSvZ28rdTTCdXByzaikMcrKbyC2D8KeQSzBEBRbvut6K-F2D9fN6_At5OPqB_F_PHFcEgjmEXHHoPzmxoW8qgtLqNQXaqF6p7-_Ds93UAvtAjVXcXkeoM7_ObldQWznJ09J9MtMt8tT_befoGeYKATeU-DUE02tOXQlA1m1Bb7qihlsdvtsqmt9tW-wX2tiqKShTwUVX2S-nQoGk2kSsxMq6SqZSl3StWV2uXVUB-qk8IKq0Ltmr2oJM1obG7tec6dHzPDHKlNHE2TWezJ8pYLpZ7SgGkqlULi29Ty0MeRRSWt4cA_QIIJdotTcqF-hntKfp2NLRJZ9LadQlhZlLfvPpowxT7XbhaqS-C318Pq3RvpZPMml4XqborPrfoWAAD__43TQAM">