summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-12-22 16:00:55 +0000
committerDan Gohman <dan433584@gmail.com>2016-12-22 16:00:55 +0000
commit207ed22660a29a4f8c0e8207112bee68c8376488 (patch)
tree722b8dffe5df8053d680384812a309eb57636f8c /llvm/lib/Target
parentbd0455defa7de4ff7f0947da638aa8c1f4b562e0 (diff)
downloadbcm5719-llvm-207ed22660a29a4f8c0e8207112bee68c8376488.tar.gz
bcm5719-llvm-207ed22660a29a4f8c0e8207112bee68c8376488.zip
[WebAssembly] Don't use variadic operand indices in the MCOperandInfo array.
llvm-svn: 290344
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
index 00afb88931e..0af13cffdb0 100644
--- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
@@ -57,7 +57,7 @@ void WebAssemblyInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
// FIXME: For CALL_INDIRECT_VOID, don't print a leading comma, because
// we have an extra flags operand which is not currently printed, for
// compatiblity reasons.
- if (i != 0 &&
+ if (i != 0 &&
(MI->getOpcode() != WebAssembly::CALL_INDIRECT_VOID ||
i != Desc.getNumOperands()))
OS << ", ";
@@ -94,9 +94,9 @@ void WebAssemblyInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
unsigned NumFixedOperands = Desc.NumOperands;
SmallSet<uint64_t, 8> Printed;
for (unsigned i = 0, e = MI->getNumOperands(); i < e; ++i) {
- const MCOperandInfo &Info = Desc.OpInfo[i];
if (!(i < NumFixedOperands
- ? (Info.OperandType == WebAssembly::OPERAND_BASIC_BLOCK)
+ ? (Desc.OpInfo[i].OperandType ==
+ WebAssembly::OPERAND_BASIC_BLOCK)
: (Desc.TSFlags & WebAssemblyII::VariableOpImmediateIsLabel)))
continue;
uint64_t Depth = MI->getOperand(i).getImm();
@@ -113,7 +113,8 @@ static std::string toString(const APFloat &FP) {
// Print NaNs with custom payloads specially.
if (FP.isNaN() &&
!FP.bitwiseIsEqual(APFloat::getQNaN(FP.getSemantics())) &&
- !FP.bitwiseIsEqual(APFloat::getQNaN(FP.getSemantics(), /*Negative=*/true))) {
+ !FP.bitwiseIsEqual(
+ APFloat::getQNaN(FP.getSemantics(), /*Negative=*/true))) {
APInt AI = FP.bitcastToAPInt();
return
std::string(AI.isNegative() ? "-" : "") + "nan:0x" +
OpenPOWER on IntegriCloud