[llvm] r229979 - Fix build with gcc. This has a -Wsequence-point error on 'MII', which is a good point.

Nick Lewycky nicholas at mxc.ca
Thu Feb 19 23:17:40 PST 2015


Author: nicholas
Date: Fri Feb 20 01:17:40 2015
New Revision: 229979

URL: http://llvm.org/viewvc/llvm-project?rev=229979&view=rev
Log:
Fix build with gcc. This has a -Wsequence-point error on 'MII', which is a good point.

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=229979&r1=229978&r2=229979&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Fri Feb 20 01:17:40 2015
@@ -152,11 +152,9 @@ void AsmPrinter::EmitInlineAsm(StringRef
   // 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<const MCInstrInfo *>(
-                                     MF->getSubtarget().getInstrInfo())
-                               : MII = static_cast<const MCInstrInfo *>(
-                                     TM.getTarget().createMCInstrInfo());
+  const MCInstrInfo *MII =
+      MF ? static_cast<const MCInstrInfo *>(MF->getSubtarget().getInstrInfo())
+         : static_cast<const MCInstrInfo *>(TM.getTarget().createMCInstrInfo());
   std::unique_ptr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser(
       *STI, *Parser, *MII, TM.Options.MCOptions));
   if (!TAP)





More information about the llvm-commits mailing list