Skip to content

[CIR] Upstream inline attribute handling #153277

@andykaylor

Description

@andykaylor

Overview

Upstream support for attaching the noinline, alwaysinline, and inlinehint attributes for function definitions in ClangIR.

The clang AST contains the information needed to determine when these attributes should be attached. The CIR generation code just needs to add handling to check for the presence of these attributes in the AST and to attach them to the generated function definitions.

Suggested minimal test case

inline void f1() {}

__attribute__((noinline))
void f2() {}

__attribute__((always_inline))
void f3() {}
}```

### Existing incubator tests
clang/test/CIR/CodeGen/function-attrs.cpp

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