This needs to be a const variable so the two sides of the ternary
[oota-llvm.git] / lib / CodeGen / AsmPrinter / AsmPrinterInlineAsm.cpp
index 57f05be35c982b8f9680471a6ec41ef53e3969d8..d24a2a23d46b1e2153ce53f14ccef0aa9c94650f 100644 (file)
@@ -152,7 +152,8 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
   // and not have a MachineFunction to initialize the TargetInstrInfo from and
   // we only need MCInstrInfo for asm parsing.
   std::unique_ptr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser(
-      *STI, *Parser, MII ? *MII : *TM.getTarget().createMCInstrInfo(),
+      *STI, *Parser, MII ? *MII : *static_cast<const MCInstrInfo *>(
+                                      TM.getTarget().createMCInstrInfo()),
       TM.Options.MCOptions));
   if (!TAP)
     report_fatal_error("Inline asm not supported by this streamer because"