[llvm] r229938 - This needs to be a const variable so the two sides of the ternary

Eric Christopher echristo at gmail.com
Thu Feb 19 16:03:45 PST 2015


Author: echristo
Date: Thu Feb 19 18:03:45 2015
New Revision: 229938

URL: http://llvm.org/viewvc/llvm-project?rev=229938&view=rev
Log:
This needs to be a const variable so the two sides of the ternary
operator agree on type.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=229938&r1=229937&r2=229938&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Feb 19 18:03:45 2015
@@ -152,7 +152,8 @@ void AsmPrinter::EmitInlineAsm(StringRef
   // 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"





More information about the llvm-commits mailing list