From f01061e39fc28983fb0cffc7faec60cc5683b16f Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Sat, 1 Nov 2025 08:06:33 -0700 Subject: [PATCH] Ensure that AggressiveInlining is emitted for the IID helpers --- .../CSharp/CSharpOutputBuilder.Visit.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.Visit.cs b/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.Visit.cs index 7ffda523..c5afdc19 100644 --- a/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.Visit.cs +++ b/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.Visit.cs @@ -84,6 +84,10 @@ public void WriteIid(string name, Guid value) WriteLine(name); WriteBlockStart(); + if (_generator.Config.GenerateAggressiveInlining) + { + WriteIndentedLine("[MethodImpl(MethodImplOptions.AggressiveInlining)]"); + } WriteIndentedLine("get"); WriteBlockStart();