Skip to content

[CIR] Upstream support for structure types #130199

@andykaylor

Description

@andykaylor

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)

Metadata

Metadata

Assignees

Labels

ClangIRAnything related to the ClangIR project

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions