summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2015-02-20 07:17:40 +0000
committerNick Lewycky <nicholas@mxc.ca>2015-02-20 07:17:40 +0000
commitb73c0410050aabeefd44249d6e1d458d75c68055 (patch)
tree27af946c1452f3fd895a5f4da47b5ce2fa43342d /llvm/lib/CodeGen/AsmPrinter
parenta7249ec1a714bea254832a75df490118dea23861 (diff)
downloadbcm5719-llvm-b73c0410050aabeefd44249d6e1d458d75c68055.tar.gz
bcm5719-llvm-b73c0410050aabeefd44249d6e1d458d75c68055.zip
Fix build with gcc. This has a -Wsequence-point error on 'MII', which is a good point.
llvm-svn: 229979
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index 2ece39a73f6..c95777e40d1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/llvm/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<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)
OpenPOWER on IntegriCloud