[clang] [CIR] Add inline function attributes (PR #162866)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 10 14:15:26 PDT 2025


================
@@ -1801,6 +1817,16 @@ void cir::FuncOp::print(OpAsmPrinter &p) {
     p << ")";
   }
 
+  if (auto inlineKind = getInlineKind()) {
+    if (*inlineKind == cir::InlineKind::NoInline) {
+      p << " inline_never";
+    } else if (*inlineKind == cir::InlineKind::AlwaysInline) {
+      p << " inline_always";
+    } else if (*inlineKind == cir::InlineKind::InlineHint) {
+      p << " inline_hint";
+    }
----------------
xlauko wrote:

I believe this should use stringify method from the generate `CIR_InlineAttr` instead of manual listing.
The attribute needs to be fixed though to specify expected stringified names.

https://github.com/llvm/llvm-project/pull/162866


More information about the cfe-commits mailing list