From 0ba76cd459cc09c5f2f417dd527ef70c11abf857 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 20 Feb 2015 07:17:40 +0000 Subject: [PATCH] Fix build with gcc. This has a -Wsequence-point error on 'MII', which is a good point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229979 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp index 2ece39a73f6..c95777e40d1 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp @@ -152,11 +152,9 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode, // We may create a new MCInstrInfo here since we might be at the module level // and not have a MachineFunction to initialize the TargetInstrInfo from and // we only need MCInstrInfo for asm parsing. - const MCInstrInfo *MII = MF - ? MII = static_cast( - MF->getSubtarget().getInstrInfo()) - : MII = static_cast( - TM.getTarget().createMCInstrInfo()); + const MCInstrInfo *MII = + MF ? static_cast(MF->getSubtarget().getInstrInfo()) + : static_cast(TM.getTarget().createMCInstrInfo()); std::unique_ptr TAP(TM.getTarget().createMCAsmParser( *STI, *Parser, *MII, TM.Options.MCOptions)); if (!TAP)