To register the code emitter, the following code needs adding to the
machine code target description
.
arch
MCTargetDesc.cpp
// Register the MC code emitter TargetRegistry::RegisterMCCodeEmitter(Thearch
Target, llvm::createarch
MCCodeEmitter);
The create
function is declared in the
arch
MCCodeEmitter
header file and is defined in
arch
MCTargetDesc.h
.
This function simply creates and returns a new
arch
MCCodeEmitter.cpp
.
arch
MCCodeEmitter