From: Dan Gohman Date: Tue, 12 Jan 2016 03:30:06 +0000 (+0000) Subject: [WebAssembly] Register the MC subtarget info. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fa4ea3ca8377ea539bd6fceaca3ab587a6468dea;p=oota-llvm.git [WebAssembly] Register the MC subtarget info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257439 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp index 3f04106e606..6436fd84307 100644 --- a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp +++ b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp @@ -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); } }