Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

45 lines
1.0 KiB
C#

//
// Mono.ILASM.LdstrInstr
//
// Author(s):
// Jackson Harper (Jackson@LatitudeGeo.com)
//
// (C) 2003 Jackson Harper, All rights reserved
//
using System;
namespace Mono.ILASM {
public class LdstrInstr : IInstr {
private string operand;
private byte[] b_operand;
public LdstrInstr (string operand, Location loc)
: base (loc)
{
this.operand = operand;
}
public LdstrInstr (byte[] b_operand, Location loc)
: base (loc)
{
this.b_operand = b_operand;
}
public override void Emit (CodeGen code_gen, MethodDef meth,
PEAPI.CILInstructions cil)
{
if (operand != null)
cil.ldstr (operand);
else
cil.ldstr (b_operand);
}
}
}