-
Notifications
You must be signed in to change notification settings - Fork 553
[XABT] Add comprehensive XML documentation for LLVM IR generator classes #10285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
/// <summary> | ||
/// Abstract base class for LLVM IR variable references. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these lines, they are duplicates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6973b39 - removed the duplicate XML documentation comments for LlvmIrVariableReference.
public Type Type { get; protected set; } | ||
/// <summary> | ||
/// Gets or sets the write options that control how this variable is output in LLVM IR. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a remarks section documenting the default property value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 6973b39 - remarks section documenting that WriteOptions defaults to ArrayWriteIndexComments.
public string? Comment { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the number format to use when writing numeric values. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a remarks section documenting the default property value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 6973b39 - remarks section documenting that NumberFormat defaults to Decimal.
/// <summary> | ||
/// Represents a global LLVM IR variable. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these lines, they are duplicates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6973b39 - removed the duplicate XML documentation comments for LlvmIrGlobalVariable.
public LlvmIrStringVariable (string name, string value, LlvmIrStringEncoding encoding, StringComparison comparison = StringComparison.Ordinal, LlvmIrVariableOptions? options = null) | ||
: this (name, new StringHolder (value, encoding, comparison), options) | ||
{} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in 6973b39 - removed the accidentally added extra closing brace.
- Remove duplicate XML documentation comments for LlvmIrVariableReference and LlvmIrGlobalVariable - Add remarks sections documenting default values for WriteOptions and NumberFormat properties - Remove accidentally added extra closing brace Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
This PR adds comprehensive XML documentation comments for classes and public/protected/internal methods in the
src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/
directory.Summary
Added missing documentation for 20 out of 46 files (43% complete) in the LLVM IR generator, establishing clear documentation patterns and providing substantial coverage of the core infrastructure.
Changes Made
Core Infrastructure Documentation:
Enums and Constants:
Attributes and Annotations:
Utility Classes:
Documentation Standards
All documentation follows C# XML documentation standards with:
<summary>
tags explaining purpose and usage context<param>
tags describing parameter purposes and constraints<returns>
tags explaining return values and possible states<exception>
tags documenting when exceptions are thrownExample
Remaining Work
The following 26 files still need documentation:
LlvmIrGenerator.cs
,LlvmIrModule.cs
,LlvmIrFunction.cs
,LlvmIrInstructions.cs
LlvmIrModuleTarget.cs
and architecture-specific modulesStructureInfo.cs
,StructureInstance.cs
, etc.This PR establishes clear patterns for completing the remaining documentation.
Addressing #10284.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.