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

llvm-svn: 229979
This commit is contained in:
Nick Lewycky 2015-02-20 07:17:40 +00:00
parent a7249ec1a7
commit b73c041005
1 changed files with 3 additions and 5 deletions

View File

@ -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 // 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 // and not have a MachineFunction to initialize the TargetInstrInfo from and
// we only need MCInstrInfo for asm parsing. // we only need MCInstrInfo for asm parsing.
const MCInstrInfo *MII = MF const MCInstrInfo *MII =
? MII = static_cast<const MCInstrInfo *>( MF ? static_cast<const MCInstrInfo *>(MF->getSubtarget().getInstrInfo())
MF->getSubtarget().getInstrInfo()) : static_cast<const MCInstrInfo *>(TM.getTarget().createMCInstrInfo());
: MII = static_cast<const MCInstrInfo *>(
TM.getTarget().createMCInstrInfo());
std::unique_ptr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser( std::unique_ptr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser(
*STI, *Parser, *MII, TM.Options.MCOptions)); *STI, *Parser, *MII, TM.Options.MCOptions));
if (!TAP) if (!TAP)