[PATCH] D11567: WebAssembly: MCAsmInfo only has one syntax variant for now.

JF Bastien jfb at chromium.org
Tue Jul 28 10:23:47 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL243452: WebAssembly: MCAsmInfo only has one syntax variant for now. (authored by jfb).

Changed prior to commit:
  http://reviews.llvm.org/D11567?vs=30835&id=30836#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D11567

Files:
  llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp

Index: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
@@ -37,17 +37,15 @@
 
 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11567.30836.patch
Type: text/x-patch
Size: 1060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150728/5173dd82/attachment.bin>


More information about the llvm-commits mailing list