Method EmitToBuffer
EmitToBuffer(IModule, CodeGenFileKind)
Emits the module for the target machine to a MemoryBuffer
[SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "bufferHandle ownership is 'Moved' to the returned MemoryBuffer")]
public MemoryBuffer EmitToBuffer(IModule module, CodeGenFileKind fileType)
Parameters
moduleIModuleModuleHandle to emit to the buffer
fileTypeCodeGenFileKindType of file to generate into the buffer
Returns
- MemoryBuffer
MemoryBuffer containing the generated code
Remarks
The TargetTriple must match the Triple for this target.