From 6b43809281221adccad15e4f3e3393dc629e0d3e Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Tue, 28 Jul 2015 17:23:07 +0000 Subject: [PATCH] WebAssembly: MCAsmInfo only has one syntax variant for now. Summary: MCAsmInfo is set up with the default AssemblerDialect, which is zero. Subscribers: llvm-commits, sunfish, jfb Differential Revision: http://reviews.llvm.org/D11567 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243452 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp index d1616907fb4..0644fd80bdf 100644 --- a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp +++ b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp @@ -37,17 +37,15 @@ using namespace llvm; static MCAsmInfo *createWebAssemblyMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT) { - MCAsmInfo *MAI = new WebAssemblyMCAsmInfo(TT); - return MAI; + return new WebAssemblyMCAsmInfo(TT); } static MCInstPrinter * createWebAssemblyMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) { - if (SyntaxVariant == 0 || SyntaxVariant == 1) - return new WebAssemblyInstPrinter(MAI, MII, MRI); - return nullptr; + assert(SyntaxVariant == 0); + return new WebAssemblyInstPrinter(MAI, MII, MRI); } // Force static initialization.