1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-30 23:02:02 +00:00
Ryujinx/ChocolArm64/Translation/ILLabel.cs

28 lines
555 B
C#
Raw Normal View History

using System.Reflection.Emit;
namespace ChocolArm64.Translation
{
class ILLabel : IILEmit
{
private bool _hasLabel;
private Label _label;
public void Emit(ILMethodBuilder context)
{
context.Generator.MarkLabel(GetLabel(context));
}
public Label GetLabel(ILMethodBuilder context)
{
if (!_hasLabel)
{
_label = context.Generator.DefineLabel();
_hasLabel = true;
}
return _label;
}
}
}