diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp index 57f05be35c9..d24a2a23d46 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp @@ -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 TAP(TM.getTarget().createMCAsmParser( - *STI, *Parser, MII ? *MII : *TM.getTarget().createMCInstrInfo(), + *STI, *Parser, MII ? *MII : *static_cast( + TM.getTarget().createMCInstrInfo()), TM.Options.MCOptions)); if (!TAP) report_fatal_error("Inline asm not supported by this streamer because"