1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[WebAssembly] Register the MC subtarget info.

llvm-svn: 257439
This commit is contained in:
Dan Gohman 2016-01-12 03:30:06 +00:00
parent 07131ec8af
commit ba5f0b5ef9

View File

@ -73,6 +73,11 @@ static MCAsmBackend *createAsmBackend(const Target & /*T*/,
return createWebAssemblyAsmBackend(TT);
}
static MCSubtargetInfo *createMCSubtargetInfo(const Triple &TT, StringRef CPU,
StringRef FS) {
return createWebAssemblyMCSubtargetInfoImpl(TT, CPU, FS);
}
// Force static initialization.
extern "C" void LLVMInitializeWebAssemblyTargetMC() {
for (Target *T : {&TheWebAssemblyTarget32, &TheWebAssemblyTarget64}) {
@ -93,5 +98,8 @@ extern "C" void LLVMInitializeWebAssemblyTargetMC() {
// Register the ASM Backend.
TargetRegistry::RegisterMCAsmBackend(*T, createAsmBackend);
// Register the MC subtarget info.
TargetRegistry::RegisterMCSubtargetInfo(*T, createMCSubtargetInfo);
}
}