[WebAsssembly] Register the MC register info.

llvm-svn: 257525
This commit is contained in:
Dan Gohman 2016-01-12 21:27:55 +00:00
parent 2ddcbcf464
commit 0656f5f845
1 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,12 @@ static MCInstrInfo *createMCInstrInfo() {
return X;
}
static MCRegisterInfo *createMCRegisterInfo(const Triple & /*T*/) {
MCRegisterInfo *X = new MCRegisterInfo();
InitWebAssemblyMCRegisterInfo(X, 0);
return X;
}
static MCInstPrinter *createMCInstPrinter(const Triple & /*T*/,
unsigned SyntaxVariant,
const MCAsmInfo &MAI,
@ -93,6 +99,9 @@ extern "C" void LLVMInitializeWebAssemblyTargetMC() {
// Register the MC instruction info.
TargetRegistry::RegisterMCInstrInfo(*T, createMCInstrInfo);
// Register the MC register info.
TargetRegistry::RegisterMCRegInfo(*T, createMCRegisterInfo);
// Register the MCInstPrinter.
TargetRegistry::RegisterMCInstPrinter(*T, createMCInstPrinter);