From 2f0b27dc67a0b14575f8f19100d3a160f7feb3f4 Mon Sep 17 00:00:00 2001
From: Eric Christopher <echristo@gmail.com>
Date: Fri, 20 Feb 2015 00:03:45 +0000
Subject: [PATCH] This needs to be a const variable so the two sides of the
 ternary operator agree on type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229938 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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<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"
-- 
2.34.1