[llvm] r243452 - WebAssembly: MCAsmInfo only has one syntax variant for now.
JF Bastien
jfb at google.com
Tue Jul 28 10:23:07 PDT 2015
Author: jfb
Date: Tue Jul 28 12:23:07 2015
New Revision: 243452
URL: http://llvm.org/viewvc/llvm-project?rev=243452&view=rev
Log:
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
Modified:
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp?rev=243452&r1=243451&r2=243452&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp Tue Jul 28 12:23:07 2015
@@ -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.
More information about the llvm-commits
mailing list