Skip to content

Commit

Permalink
Merge branch 'hotfix/aot-updates' into ci/hotfix/aot-updates/wgpu_bins
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Sep 10, 2023
2 parents b034899 + a6f458a commit debeaa0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/Core/Silk.NET.SilkTouch/NativeApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,22 +412,22 @@ INamedTypeSymbol pInvokeAttribute
var processedEntrypoints = new List<EntryPoint>();
bool any = false;
foreach (var (declaration, symbol, entryPoint, callingConvention) in from declaration in
from member in classDeclarations.SelectMany(x => x.Item1.Members.Select(x2 => (x2, x.Item2)))
where member.x2.IsKind(SyntaxKind.MethodDeclaration)
select ((MethodDeclarationSyntax) member.x2, member.Item2)
let symbol = declaration.Item2.GetDeclaredSymbol(declaration.Item1)
where symbol is not null
let attribute = ToNativeApiAttribute
(
symbol.GetAttributes()
.FirstOrDefault
(att => SymbolEqualityComparer.Default.Equals(att.AttributeClass, nativeApiAttributeSymbol))
)
where declaration.Item1.Modifiers.Any
(modifier => modifier.IsKind(SyntaxKind.PartialKeyword)) && symbol.PartialImplementationPart is null
let entryPoint = NativeApiAttribute.GetEntryPoint(attribute, classNativeApiAttribute, symbol.Name)
let callingConvention = NativeApiAttribute.GetCallingConvention(attribute, classNativeApiAttribute)
select (declaration, symbol, entryPoint, callingConvention))
from member in classDeclarations.SelectMany(x => x.Item1.Members.Select(x2 => (x2, x.Item2)))
where member.x2.IsKind(SyntaxKind.MethodDeclaration)
select ((MethodDeclarationSyntax) member.x2, member.Item2)
let symbol = declaration.Item2.GetDeclaredSymbol(declaration.Item1)
where symbol is not null
let attribute = ToNativeApiAttribute
(
symbol.GetAttributes()
.FirstOrDefault
(att => SymbolEqualityComparer.Default.Equals(att.AttributeClass, nativeApiAttributeSymbol))
)
where declaration.Item1.Modifiers.Any
(modifier => modifier.IsKind(SyntaxKind.PartialKeyword)) && symbol.PartialImplementationPart is null
let entryPoint = NativeApiAttribute.GetEntryPoint(attribute, classNativeApiAttribute, symbol.Name)
let callingConvention = NativeApiAttribute.GetCallingConvention(attribute, classNativeApiAttribute)
select (declaration, symbol, entryPoint, callingConvention))
{
any = true;

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit debeaa0

Please sign in to comment.