[clang] [CIR] Add inline function attributes (PR #162866)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 10 11:08:48 PDT 2025
================
@@ -959,5 +959,31 @@ def CIR_TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
`<` custom<RecordMembers>($data) `>`
}];
}
+//===----------------------------------------------------------------------===//
+// InlineAttr
+//===----------------------------------------------------------------------===//
+
+def CIR_InlineKind : CIR_I32EnumAttr<"InlineKind", "inlineKind", [
+ I32EnumAttrCase<"NoInline", 1, "no">,
+ I32EnumAttrCase<"AlwaysInline", 2, "always">,
+ I32EnumAttrCase<"InlineHint", 3, "hint">
+]> {
+ let genSpecializedAttr = 0;
+}
+
+def CIR_InlineAttr : CIR_EnumAttr<CIR_InlineKind, "inline"> {
+ let summary = "Inline attribute";
+ let description = [{
+ Inline attributes represents user directives.
----------------
bcardosolopes wrote:
Can you please add an example? Maybe say it can only be used by cir.func and add an example there instead?
https://github.com/llvm/llvm-project/pull/162866
More information about the cfe-commits
mailing list